diff --git a/infrastructure/terraform/components/app/amplify_app.tf b/infrastructure/terraform/components/app/amplify_app.tf index d660470f..b6a5ce38 100644 --- a/infrastructure/terraform/components/app/amplify_app.tf +++ b/infrastructure/terraform/components/app/amplify_app.tf @@ -31,7 +31,6 @@ resource "aws_amplify_app" "main" { NOTIFY_GROUP = var.group NOTIFY_ENVIRONMENT = var.environment NOTIFY_DOMAIN_NAME = local.root_domain_name - NEXT_PUBLIC_DISABLE_CONTENT = var.disable_content NEXT_PUBLIC_ENABLE_COGNITO_IDP = var.enable_cognito_built_in_idp NEXT_PUBLIC_CIS2_PROVIDER_NAME = local.cis2_idp_name CSRF_SECRET = aws_ssm_parameter.csrf_secret.value diff --git a/infrastructure/terraform/components/app/variables.tf b/infrastructure/terraform/components/app/variables.tf index 93bfd3ac..ea1e4fcc 100644 --- a/infrastructure/terraform/components/app/variables.tf +++ b/infrastructure/terraform/components/app/variables.tf @@ -155,12 +155,6 @@ variable "commit_id" { default = "HEAD" } -variable "disable_content" { - type = string - description = "Value for turning switching disable content true/false" - default = "false" -} - variable "enable_cis2_idp" { type = bool description = "Switch to enable the CIS2 Cognito federation" diff --git a/src/__tests__/components/Header.test.tsx b/src/__tests__/components/Header.test.tsx index 48d43cd7..f397d813 100644 --- a/src/__tests__/components/Header.test.tsx +++ b/src/__tests__/components/Header.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { NHSNotifyHeader } from '@/src/components/molecules/Header/Header'; jest.mock('@/src/components/molecules/AuthLink/AuthLink', () => ({ @@ -6,28 +6,9 @@ jest.mock('@/src/components/molecules/AuthLink/AuthLink', () => ({ })); describe('Header component', () => { - const ENV = process.env; - - beforeEach(() => { - jest.resetModules(); - process.env = { ...ENV }; - }); - - afterAll(() => { - process.env = ENV; - }); - it('renders component correctly', async () => { const container = render(); expect(container.asFragment()).toMatchSnapshot(); }); - - it('should not render auth link', () => { - process.env.NEXT_PUBLIC_DISABLE_CONTENT = 'true'; - - render(); - - expect(screen.queryByTestId('auth-link')).not.toBeInTheDocument(); - }); }); diff --git a/src/components/layouts/container/container.tsx b/src/components/layouts/container/container.tsx index 2c83169d..b21ec10b 100644 --- a/src/components/layouts/container/container.tsx +++ b/src/components/layouts/container/container.tsx @@ -5,12 +5,8 @@ export function NHSNotifyContainer({ }) { return (
-
- {process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true' ? ( -

Coming soon

- ) : ( - children - )} +
+ {children}
); diff --git a/src/components/molecules/Header/Header.tsx b/src/components/molecules/Header/Header.tsx index 28525f9d..f8cbb8d6 100644 --- a/src/components/molecules/Header/Header.tsx +++ b/src/components/molecules/Header/Header.tsx @@ -49,10 +49,7 @@ export function NHSNotifyHeader({ dataTestId }: HeaderType) {
- {/* I am currently testing the link wrapper, this will change later when we implement auth as the link will change based on auth state */} - {process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true' ? undefined : ( - - )} +