Skip to content

Commit 4e0b4b2

Browse files
[FEATURE] Ajouter un feature toggle pour la nouvelle page de présentation des campagnes (PIX-14946).
#10375
2 parents f029da4 + f87b0fd commit 4e0b4b2

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

api/sample.env

+8-1
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,14 @@ TEST_REDIS_URL=redis://localhost:6379
778778
# default: false
779779
# FT_ENABLE_NEED_TO_ADJUST_CERTIFICATION_ACCESSIBILITY=false
780780

781-
# Display the new result page
781+
# Display the new campaign presentation page
782+
#
783+
# presence: optional
784+
# type: boolean
785+
# default: false
786+
# FT_SHOW_NEW_CAMPAIGN_PRESENTATION_PAGE=false
787+
788+
# Display the new campaign result page
782789
#
783790
# presence: optional
784791
# type: boolean

api/src/shared/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ const configuration = (function () {
214214
isPixPlusLowerLeverEnabled: toBoolean(process.env.FT_ENABLE_PIX_PLUS_LOWER_LEVEL),
215215
isTextToSpeechButtonEnabled: toBoolean(process.env.FT_ENABLE_TEXT_TO_SPEECH_BUTTON),
216216
showExperimentalMissions: toBoolean(process.env.FT_SHOW_EXPERIMENTAL_MISSIONS),
217+
showNewCampaignPresentationPage: toBoolean(process.env.FT_SHOW_NEW_CAMPAIGN_PRESENTATION_PAGE),
217218
showNewResultPage: toBoolean(process.env.FT_SHOW_NEW_RESULT_PAGE),
218219
isPixCompanionEnabled: toBoolean(process.env.FT_PIX_COMPANION_ENABLED),
219220
},

api/tests/shared/acceptance/application/feature-toggles/feature-toggle-controller_test.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe('Acceptance | Shared | Application | Controller | feature-toggle', func
2929
'is-pix-plus-lower-lever-enabled': false,
3030
'is-need-to-adjust-certification-accessibility-enabled': false,
3131
'is-text-to-speech-button-enabled': false,
32+
'show-new-campaign-presentation-page': false,
3233
'show-new-result-page': false,
3334
'show-experimental-missions': false,
3435
'is-pix-companion-enabled': false,

mon-pix/app/models/feature-toggle.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Model, { attr } from '@ember-data/model';
33
export default class FeatureToggle extends Model {
44
@attr('boolean') isNewAuthenticationDesignEnabled;
55
@attr('boolean') isTextToSpeechButtonEnabled;
6+
@attr('boolean') showNewCampaignPresentationPage;
67
@attr('boolean') showNewResultPage;
78
@attr('boolean') isPixCompanionEnabled;
89
}

mon-pix/tests/unit/services/feature-toggles-test.js

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module('Unit | Service | feature-toggles', function (hooks) {
1212
isTextToSpeechButtonEnabled: false,
1313
isNewAuthenticationDesignEnabled: false,
1414
isPixCompanionEnabled: false,
15+
showNewCampaignPresentationPage: false,
1516
});
1617

1718
let storeStub;
@@ -69,5 +70,17 @@ module('Unit | Service | feature-toggles', function (hooks) {
6970
// then
7071
assert.false(featureToggleService.featureToggles.isPixCompanionEnabled);
7172
});
73+
74+
test('it initializes the feature toggle showNewCampaignPresentationPage to false', async function (assert) {
75+
// given
76+
const featureToggleService = this.owner.lookup('service:featureToggles');
77+
featureToggleService.set('store', storeStub);
78+
79+
// when
80+
await featureToggleService.load();
81+
82+
// then
83+
assert.false(featureToggleService.featureToggles.showNewCampaignPresentationPage);
84+
});
7285
});
7386
});

0 commit comments

Comments
 (0)