Skip to content
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
1 change: 0 additions & 1 deletion docker/env/gafl_webapp.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ ENABLE_ANALYTICS_OPT_IN_DEBUGGING=true
SHOW_CANCELLATION_JOURNEY=true

## Public Switch
// DEV & TEST envs set to true; TRAIN, PRE, PROD set to false
SHOW_CANCELLATION_JOURNEY_PUBLIC=true
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ describe('isStaticResource', () => {
})

describe('includesRegex', () => {
const regexArray = [/^\/buy\/renew\/identify$/, /^\/renew\/.*$/, /^\/renew-my-licence\/.*$/]
const regexArray = [
/^\/buy\/renew\/identify$/,
/^\/renew\/.*$/,
/^\/renew-my-licence\/.*$/,
/^\/buy\/cancel-recurring-payment\/identify$/
]
it.each([
'/buy/renew/identify',
'/renew/ABC123',
Expand All @@ -39,14 +44,18 @@ describe('includesRegex', () => {
'/renew-my-licence/ABC123',
'/renew-my-licence/123123',
'/renew-my-licence/ABCDEF',
'/renew-my-licence/anytext'
'/renew-my-licence/anytext',
'/buy/cancel-recurring-payment/identify'
])('returns true if one of the regexes is matched %s', async path => {
expect(includesRegex(path, regexArray)).toBeTruthy()
})

it.each(['/buy/renew', '/buy', '/rene', '/buy/order-complete'])('returns false if one of the regexes is not matched %s', async path => {
expect(includesRegex(path, regexArray)).toBeFalsy()
})
it.each(['/buy/renew', '/buy', '/rene', '/buy/order-complete', '/buy/cancel-recurring-payment/details'])(
'returns false if one of the regexes is not matched %s',
async path => {
expect(includesRegex(path, regexArray)).toBeFalsy()
}
)
})

describe('Use session cookie', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ const agreedHandlerProtectionExemptSet = [
NEW_PRICES.uri
]

// regex for /renew/{referenceNumber?}, /buy/renew/identify, /renew-my-licence/{referenceNumber?}, and static guidance pages
// regex for /renew/{referenceNumber?}, /buy/renew/identify, /renew-my-licence/{referenceNumber?}, /buy/cancel-recurring-payment/identify, and static guidance pages
const startProtectionExemptSet = [
/^\/renew\/.*$/,
/^\/buy\/renew\/identify$/,
/^\/renew-my-licence\/.*$/,
/^\/buy\/cancel-recurring-payment\/identify$/,
/^\/guidance\/cookies$/,
/^\/guidance\/accessibility-statement$/,
/^\/guidance\/privacy-policy$/,
Expand Down
Loading