diff --git a/api/sample.env b/api/sample.env index 7808864d7c0..c6f3f1604f9 100644 --- a/api/sample.env +++ b/api/sample.env @@ -778,7 +778,14 @@ TEST_REDIS_URL=redis://localhost:6379 # default: false # FT_ENABLE_NEED_TO_ADJUST_CERTIFICATION_ACCESSIBILITY=false -# Display the new result page +# Display the new campaign presentation page +# +# presence: optional +# type: boolean +# default: false +# FT_SHOW_NEW_CAMPAIGN_PRESENTATION_PAGE=false + +# Display the new campaign result page # # presence: optional # type: boolean diff --git a/api/src/shared/config.js b/api/src/shared/config.js index 02738b4ddd7..10a3c852c1f 100644 --- a/api/src/shared/config.js +++ b/api/src/shared/config.js @@ -214,6 +214,7 @@ const configuration = (function () { isPixPlusLowerLeverEnabled: toBoolean(process.env.FT_ENABLE_PIX_PLUS_LOWER_LEVEL), isTextToSpeechButtonEnabled: toBoolean(process.env.FT_ENABLE_TEXT_TO_SPEECH_BUTTON), showExperimentalMissions: toBoolean(process.env.FT_SHOW_EXPERIMENTAL_MISSIONS), + showNewCampaignPresentationPage: toBoolean(process.env.FT_SHOW_NEW_CAMPAIGN_PRESENTATION_PAGE), showNewResultPage: toBoolean(process.env.FT_SHOW_NEW_RESULT_PAGE), isPixCompanionEnabled: toBoolean(process.env.FT_PIX_COMPANION_ENABLED), }, diff --git a/api/tests/shared/acceptance/application/feature-toggles/feature-toggle-controller_test.js b/api/tests/shared/acceptance/application/feature-toggles/feature-toggle-controller_test.js index 633c0050fc6..5d3c5960260 100644 --- a/api/tests/shared/acceptance/application/feature-toggles/feature-toggle-controller_test.js +++ b/api/tests/shared/acceptance/application/feature-toggles/feature-toggle-controller_test.js @@ -29,6 +29,7 @@ describe('Acceptance | Shared | Application | Controller | feature-toggle', func 'is-pix-plus-lower-lever-enabled': false, 'is-need-to-adjust-certification-accessibility-enabled': false, 'is-text-to-speech-button-enabled': false, + 'show-new-campaign-presentation-page': false, 'show-new-result-page': false, 'show-experimental-missions': false, 'is-pix-companion-enabled': false, diff --git a/mon-pix/app/models/feature-toggle.js b/mon-pix/app/models/feature-toggle.js index bba27bfe6a3..e2108089169 100644 --- a/mon-pix/app/models/feature-toggle.js +++ b/mon-pix/app/models/feature-toggle.js @@ -3,6 +3,7 @@ import Model, { attr } from '@ember-data/model'; export default class FeatureToggle extends Model { @attr('boolean') isNewAuthenticationDesignEnabled; @attr('boolean') isTextToSpeechButtonEnabled; + @attr('boolean') showNewCampaignPresentationPage; @attr('boolean') showNewResultPage; @attr('boolean') isPixCompanionEnabled; } diff --git a/mon-pix/tests/unit/services/feature-toggles-test.js b/mon-pix/tests/unit/services/feature-toggles-test.js index 489b1cf2042..b2fc74bf9de 100644 --- a/mon-pix/tests/unit/services/feature-toggles-test.js +++ b/mon-pix/tests/unit/services/feature-toggles-test.js @@ -12,6 +12,7 @@ module('Unit | Service | feature-toggles', function (hooks) { isTextToSpeechButtonEnabled: false, isNewAuthenticationDesignEnabled: false, isPixCompanionEnabled: false, + showNewCampaignPresentationPage: false, }); let storeStub; @@ -69,5 +70,17 @@ module('Unit | Service | feature-toggles', function (hooks) { // then assert.false(featureToggleService.featureToggles.isPixCompanionEnabled); }); + + test('it initializes the feature toggle showNewCampaignPresentationPage to false', async function (assert) { + // given + const featureToggleService = this.owner.lookup('service:featureToggles'); + featureToggleService.set('store', storeStub); + + // when + await featureToggleService.load(); + + // then + assert.false(featureToggleService.featureToggles.showNewCampaignPresentationPage); + }); }); });