Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature flag and link for system returns notifications #2644

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TRIGGER_SROC_TWO_PART_TARIFF=
TRIGGER_SROC_ANNUAL=
SHOW_RETURN_REQUIREMENTS=
USE_NEW_BILL_RUN_SETUP=
ENABLE_SYSTEM_NOTIFICATIONS_INVITATIONS=
ENABLE_SYSTEM_NOTIFICATIONS=

# Set log level for app. Default is 'info'
WRLS_LOG_LEVEL=debug
2 changes: 1 addition & 1 deletion src/internal/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module.exports = {
useNewBillRunSetup: (get(process.env, 'USE_NEW_BILL_RUN_SETUP') || '').toLowerCase() === 'true',
useWorkflowSetupLinks: (get(process.env, 'USE_WORKFLOW_SETUP_LINKS') || 'true').toLowerCase() === 'true',
enableSystemLicenceView: process.env.ENABLE_SYSTEM_LICENCE_VIEW === 'true',
enableSystemNotificationsInvitations: process.env.ENABLE_SYSTEM_NOTIFICATIONS_INVITATIONS === 'true',
enableSystemNotifications: process.env.ENABLE_SYSTEM_NOTIFICATIONS === 'true',
enableMonitoringStationsView: process.env.ENABLE_MONITORING_STATIONS_VIEW === 'true'
},
billRunsToDisplayPerPage: process.env.BILL_RUNS_TO_DISPLAY_PER_PAGE || 20
Expand Down
4 changes: 2 additions & 2 deletions src/internal/modules/manage/lib/manage-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const getManageTabConfig = request => mapValues(
)

const _returnNotificationsInvitations = () => {
if (config.featureToggles.enableSystemNotificationsInvitations) {
return '/system/notifications/invitations/setup/returns-period'
if (config.featureToggles.enableSystemNotifications) {
return '/system/notifications/setup/returns-period'
} else {
return '/returns-notifications/invitations'
}
Expand Down
8 changes: 4 additions & 4 deletions test/internal/modules/manage/lib/manage-nav.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ experiment('getManageTabConfig', () => {

experiment('when user has bulk returns notifications scope', () => {
beforeEach(() => {
config.featureToggles.enableSystemNotificationsInvitations = false
config.featureToggles.enableSystemNotifications = false
})

test('they can view notification report, return invitations and return reminders notifications', async () => {
Expand Down Expand Up @@ -224,9 +224,9 @@ experiment('getManageTabConfig', () => {
})
})

experiment('when the "enableSystemNotificationsInvitations" flag is true', () => {
experiment('when the "enableSystemNotifications" flag is true', () => {
beforeEach(() => {
config.featureToggles.enableSystemNotificationsInvitations = true
config.featureToggles.enableSystemNotifications = true
})

test('they click the link to "system"', async () => {
Expand All @@ -235,7 +235,7 @@ experiment('getManageTabConfig', () => {

expect(config.returnNotifications[0]).to.equal({
name: 'Invitations',
path: '/system/notifications/invitations/setup/returns-period',
path: '/system/notifications/setup/returns-period',
scopes: 'bulk_return_notifications'
})
})
Expand Down
Loading