Skip to content

Commit

Permalink
CCM-6833: Add place holder stage to auth
Browse files Browse the repository at this point in the history
  • Loading branch information
m-salaudeen committed Oct 16, 2024
1 parent 0a9bd0c commit 5b8dc9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/components/Header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Header component', () => {
});

it('should not render login link', () => {
process.env.NEXT_PUBLIC_FEATURE_VISIBILITY_TESTING = 'on';
process.env.NEXT_PUBLIC_DISABLE_CONTENT = 'true';
render(<NHSNotifyHeader />);

expect(screen.queryByTestId('login-link')).not.toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/container/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function NHSNotifyContainer({
return (
<div className='nhsuk-width-container'>
<main className='nhsuk-main-wrapper nhsuk-u-padding-top-4' role='main'>
{process.env.NEXT_PUBLIC_FEATURE_VISIBILITY_TESTING === 'on' ? (
{process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true' ? (
<h1>Coming soon</h1>
) : (
children
Expand Down
5 changes: 2 additions & 3 deletions src/components/molecules/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function NHSNotifyHeader({ className, dataTestId }: HeaderType) {
<Link
className='nhsuk-header__link nhsuk-header__link--service'
href={
process.env.NEXT_PUBLIC_FEATURE_VISIBILITY_TESTING === 'on'
process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true'
? '/'
: '/create-and-submit-templates'
}
Expand Down Expand Up @@ -55,8 +55,7 @@ export function NHSNotifyHeader({ className, dataTestId }: HeaderType) {
id='content-header'
>
{/* 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_FEATURE_VISIBILITY_TESTING ===
'on' ? undefined : (
{process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true' ? undefined : (
<div className='nhsuk-account__login' data-testid='login-link'>
<Link className='nhsuk-account__login--link' href='/'>
{content.components.headerComponent.links.logIn}
Expand Down

0 comments on commit 5b8dc9d

Please sign in to comment.