Skip to content

Commit 1f86357

Browse files
committed
CCM-8590: try NEXT_PUBLIC
1 parent f262dcd commit 1f86357

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

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

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

4040
permissions:
4141
id-token: write # This is required for requesting the JWT

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ on:
3434

3535
env:
3636
AWS_REGION: eu-west-2
37-
ENABLE_LETTERS: true
37+
NEXT_PUBLIC_ENABLE_LETTERS: true
3838

3939
permissions:
4040
id-token: write # This is required for requesting the JWT

frontend/.env.template

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

frontend/src/__tests__/app/choose-a-template-type/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test('ChooseATemplateTypePage', async () => {
3737
});
3838

3939
test('ChooseATemplateTypePage - LETTER option is hidden when feature flag is not enabled', async () => {
40-
delete process.env.ENABLE_LETTERS;
40+
delete process.env.NEXT_PUBLIC_ENABLE_LETTERS;
4141

4242
const page = await ChooseATemplateTypePage();
4343

frontend/src/__tests__/app/copy-template/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('CopyTemplatePage', () => {
5050
});
5151

5252
it('Letter option is hidden when the feature flag is not enabled', async () => {
53-
delete process.env.ENABLE_LETTERS;
53+
delete process.env.NEXT_PUBLIC_ENABLE_LETTERS;
5454

5555
getTemplateMock.mockResolvedValueOnce(template);
5656

frontend/src/__tests__/app/create-letter-template/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('CreateLetterTemplatePage', () => {
1313
});
1414

1515
it('returns 404 when letters feature flag is not enabled', async () => {
16-
delete process.env.ENABLE_LETTERS;
16+
delete process.env.NEXT_PUBLIC_ENABLE_LETTERS;
1717

1818
await expect(CreateLetterTemplatePage()).rejects.toThrow('NEXT_NOT_FOUND');
1919
});

frontend/src/app/choose-a-template-type/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { TemplateType } from 'nhs-notify-backend-client';
55

66
const ChooseATemplateTypePage = async () => {
77
const templateTypes = Object.values(TemplateType).filter(
8-
(t) => process.env.ENABLE_LETTERS || t !== TemplateType.LETTER
8+
(t) => process.env.NEXT_PUBLIC_ENABLE_LETTERS || t !== TemplateType.LETTER
99
);
1010

1111
return <ChooseTemplate templateTypes={templateTypes} />;

frontend/src/app/copy-template/[templateId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CopyTemplatePage = async (props: PageProps) => {
2222
}
2323

2424
const templateTypes = Object.values(TemplateType).filter(
25-
(t) => process.env.ENABLE_LETTERS || t !== TemplateType.LETTER
25+
(t) => process.env.NEXT_PUBLIC_ENABLE_LETTERS || t !== TemplateType.LETTER
2626
);
2727

2828
return (

frontend/src/app/create-letter-template/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain';
22
import { notFound } from 'next/navigation';
33

44
const CreateLetterTemplatePage = async () => {
5-
if (!process.env.ENABLE_LETTERS) notFound();
5+
if (!process.env.NEXT_PUBLIC_ENABLE_LETTERS) notFound();
66

77
return (
88
<NHSNotifyMain>

tests/test-team/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare global {
44
API_BASE_URL: string;
55
COGNITO_USER_POOL_CLIENT_ID: string;
66
COGNITO_USER_POOL_ID: string;
7-
ENABLE_LETTERS: string;
7+
NEXT_PUBLIC_ENABLE_LETTERS: string;
88
PLAYWRIGHT_RUN_ID: string;
99
TEMPLATES_TABLE_NAME: string;
1010
}

0 commit comments

Comments
 (0)