Skip to content

Commit

Permalink
✨ api: create FT_PIX_COMPANION_ENABLED feature toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiaPena committed Oct 10, 2024
1 parent 66ebfd6 commit 93072f7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,13 @@ TEST_REDIS_URL=redis://localhost:6379
# default: false
#FT_ENABLE_V3_ELIGIBILITY_CHECK=false

# Consider the Pix Companion extension as active
#
# presence: optional
# type: boolean
# default: false
# FT_PIX_COMPANION_ENABLED=false

# =====
# CPF
# =====
Expand Down
2 changes: 2 additions & 0 deletions api/src/shared/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const configuration = (function () {
isTextToSpeechButtonEnabled: toBoolean(process.env.FT_ENABLE_TEXT_TO_SPEECH_BUTTON),
showExperimentalMissions: toBoolean(process.env.FT_SHOW_EXPERIMENTAL_MISSIONS),
showNewResultPage: toBoolean(process.env.FT_SHOW_NEW_RESULT_PAGE),
isPixCompanionEnabled: toBoolean(process.env.FT_PIX_COMPANION_ENABLED),
},
hapi: {
options: {},
Expand Down Expand Up @@ -414,6 +415,7 @@ const configuration = (function () {
config.featureToggles.isNeedToAdjustCertificationAccessibilityEnabled = false;
config.featureToggles.showNewResultPage = false;
config.featureToggles.showExperimentalMissions = false;
config.featureToggles.isPixCompanionEnabled = false;

config.mailing.enabled = false;
config.mailing.provider = 'brevo';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const schema = Joi.object({
FT_ENABLE_NEED_TO_ADJUST_CERTIFICATION_ACCESSIBILITY: Joi.string().optional().valid('true', 'false'),
FT_ENABLE_PIX_PLUS_LOWER_LEVEL: Joi.string().optional().valid('true', 'false'),
FT_ENABLE_TEXT_TO_SPEECH_BUTTON: Joi.string().optional().valid('true', 'false'),
FT_PIX_COMPANION_ENABLED: Joi.string().optional().valid('true', 'false'),
KNEX_ASYNC_STACKTRACE_ENABLED: Joi.string().optional().valid('true', 'false'),
LCMS_API_KEY: Joi.string().required(),
LCMS_API_URL: Joi.string().uri().required(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('Acceptance | Shared | Application | Controller | feature-toggle', func
'is-text-to-speech-button-enabled': false,
'show-new-result-page': false,
'show-experimental-missions': false,
'is-pix-companion-enabled': false,
},
},
};
Expand Down

0 comments on commit 93072f7

Please sign in to comment.