Skip to content

Commit 13148bd

Browse files
authored
Merge pull request #314 from NHSDigital/feature/CCM-8580-choose-letter-env-var
CCM-8580: letter feature flag env var fixes
2 parents 4f2afd2 + 40e5248 commit 13148bd

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

.github/workflows/stage-2-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ on:
3535
env:
3636
AWS_REGION: eu-west-2
3737
TERM: xterm-256color
38-
NEXT_PUBLIC_ENABLE_LETTERS: true
3938

4039
permissions:
4140
id-token: write # This is required for requesting the JWT

.github/workflows/stage-4-acceptance.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ on:
3434

3535
env:
3636
AWS_REGION: eu-west-2
37-
NEXT_PUBLIC_ENABLE_LETTERS: true
3837

3938
permissions:
4039
id-token: write # This is required for requesting the JWT
@@ -90,8 +89,6 @@ jobs:
9089
runs-on: ubuntu-latest
9190
needs: [sandbox-set-up]
9291
environment: dev
93-
env:
94-
INCLUDE_AUTH_PAGES: 'true'
9592
timeout-minutes: 10
9693
steps:
9794
- name: "Checkout code"
@@ -125,8 +122,6 @@ jobs:
125122
runs-on: ubuntu-latest
126123
needs: [sandbox-set-up]
127124
environment: dev
128-
env:
129-
INCLUDE_AUTH_PAGES: 'true'
130125
timeout-minutes: 10
131126
steps:
132127
- name: "Checkout code"

frontend/.env.template

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
# Includes auth pages when building web frontend in production mode.
22
INCLUDE_AUTH_PAGES=''
3-
# Enables letters feature flag
4-
NEXT_PUBLIC_ENABLE_LETTERS=''

frontend/jest.setup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ import 'whatwg-fetch';
1313
Object.assign(global, { TextDecoder, TextEncoder });
1414

1515
createMocks();
16+
17+
// set feature flag
18+
process.env.NEXT_PUBLIC_ENABLE_LETTERS = 'true';

scripts/create-env-file.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ import { randomBytes } from 'node:crypto';
33

44
const secret = process.env.CSRF_SECRET ?? randomBytes(16).toString('hex');
55

6-
writeFileSync('./frontend/.env', `CSRF_SECRET=${secret}`);
6+
writeFileSync(
7+
'./frontend/.env',
8+
[`CSRF_SECRET=${secret}`, 'NEXT_PUBLIC_ENABLE_LETTERS=true'].join('\n')
9+
);

scripts/tests/accessibility.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -euo pipefail
44

5+
# feature flag
6+
export NEXT_PUBLIC_ENABLE_LETTERS=true
7+
8+
export INCLUDE_AUTH_PAGES=true
9+
510
npm run create-test-user
611

712
npm run build

tests/test-team/config/component/component.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const buildCommand = [
66
'INCLUDE_AUTH_PAGES=true',
77
'NEXT_PUBLIC_TIME_TILL_LOGOUT_SECONDS=25',
88
'NEXT_PUBLIC_PROMPT_SECONDS_BEFORE_LOGOUT=5',
9+
'NEXT_PUBLIC_ENABLE_LETTERS=true',
910
'npm run build && npm run start',
1011
].join(' ');
1112

0 commit comments

Comments
 (0)