generated from DTS-STN/next-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert 'Merge branch 'staging' into main'
- Loading branch information
1 parent
77b1375
commit 73b1aa4
Showing
69 changed files
with
2,374 additions
and
2,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,9 +43,6 @@ yarn-error.log* | |
.env | ||
.env.local | ||
|
||
#cert | ||
env.crt | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import '@testing-library/jest-dom' | ||
import { axe, toHaveNoViolations } from 'jest-axe' | ||
import ExitBeta from '../../components/ExitBeta' | ||
|
||
expect.extend(toHaveNoViolations) | ||
|
||
describe('Exit Beta Modal', () => { | ||
it('renders Exit Beta Modal', () => { | ||
render( | ||
<ExitBeta | ||
closeModal={() => {}} | ||
closeModalAria={'close'} | ||
continueLink="/" | ||
popupId={'Test Id'} | ||
popupTitle={'Test Title'} | ||
popupDescription={'Test Description'} | ||
popupPrimaryBtn={{ id: 'Test Primary Id', text: 'Test Primary Text' }} | ||
popupSecondaryBtn={{ | ||
id: 'Test Secondary Id', | ||
text: 'Test Secondary Text', | ||
}} | ||
/>, | ||
) | ||
const title = screen.getByText('Test Title') | ||
const description = screen.getByText('Test Description') | ||
const primaryBtnText = screen.getByText('Test Primary Text') | ||
const secondaryBtnText = screen.getByText('Test Secondary Text') | ||
expect(title).toBeInTheDocument() | ||
expect(description).toBeInTheDocument() | ||
expect(primaryBtnText).toBeInTheDocument() | ||
expect(secondaryBtnText).toBeInTheDocument() | ||
}) | ||
it('has no a11y viollations', async () => { | ||
const { container } = render( | ||
<ExitBeta | ||
closeModal={() => {}} | ||
closeModalAria={'close'} | ||
continueLink="/" | ||
popupId={'Test Id'} | ||
popupTitle={'Test Title'} | ||
popupDescription={'Test Description'} | ||
popupPrimaryBtn={{ id: 'Test Primary Id', text: 'Test Primary Text' }} | ||
popupSecondaryBtn={{ | ||
id: 'Test Secondary Id', | ||
text: 'Test Secondary Text', | ||
}} | ||
/>, | ||
) | ||
const results = await axe(container) | ||
expect(results).toHaveNoViolations() | ||
}) | ||
it('placeholder', () => {}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import '@testing-library/jest-dom' | ||
import { axe, toHaveNoViolations } from 'jest-axe' | ||
import PhaseBanner from '../../components/PhaseBanner' | ||
|
||
expect.extend(toHaveNoViolations) | ||
|
||
describe('PhaseBanner', () => { | ||
const popupContent = { | ||
scId: 'beta-popup-exit', | ||
scHeadingEn: 'Exiting beta version', | ||
scHeadingFr: 'Vous quittez la version bêta', | ||
scContentEn: | ||
'Thank you for trying the beta version. You are now returning to My Service Canada Account home page.', | ||
scContentFr: | ||
"Merci d'avoir essayé la version bêta. Nous vous redirigeons vers la page d’accueil de Mon dossier Service Canada.", | ||
scFragments: [ | ||
{ | ||
scId: 'stay-on-beta-version', | ||
// scLinkTextAssistiveEn: "Stay on beta version", | ||
// scLinkTextAssistiveFr: "Rester sur la version bêta", | ||
scLinkTextEn: 'Stay on beta version', | ||
scLinkTextFr: 'Rester sur la version bêta', | ||
}, | ||
{ | ||
scId: 'exit-beta-version', | ||
// scLinkTextAssistiveEn: 'Continue to page', | ||
// scLinkTextAssistiveFr: 'Continuer vers la page', | ||
scLinkTextEn: 'Exit Beta version', | ||
scLinkTextFr: 'Quitter la version beta', | ||
}, | ||
], | ||
} | ||
it('renders PhaseBanner', () => { | ||
render( | ||
<PhaseBanner | ||
bannerBoldText={'bannerBoldText'} | ||
bannerText={'bannerText'} | ||
bannerLink={'bannerLink'} | ||
bannerLinkHref={'bannerLinkHref'} | ||
icon={'bell'} | ||
bannerSummaryTitle={'bannerSummaryTitle'} | ||
bannerSummaryContent={'bannerSummaryContent'} | ||
bannerButtonText={'bannerButtonText'} | ||
bannerButtonLink={'bannerButtonLink'} | ||
popupContent={{ | ||
popupId: 'popup id', | ||
popupTitle: 'pop up title', | ||
popupDescription: 'pop up desc', | ||
popupPrimaryBtn: { id: 'Test Primary Id', text: 'Test Primary Text' }, | ||
popupSecondaryBtn: { id: 'Test secont Id', text: 'Test second Text' }, | ||
}} | ||
></PhaseBanner>, | ||
) | ||
const bannerBoldText = screen.getByText('bannerBoldText') | ||
const bannerSummaryTitle = screen.getByText('bannerSummaryTitle') | ||
const bannerText = screen.getByText('bannerText') | ||
const bannerLink = screen.getByText('bannerLink') | ||
const bannerSummaryContent = screen.getByText('bannerSummaryContent') | ||
const bannerButtonText = screen.getByText('bannerButtonText') | ||
expect(bannerBoldText).toBeInTheDocument() | ||
expect(bannerSummaryTitle).toBeInTheDocument() | ||
expect(bannerText).toBeInTheDocument() | ||
expect(bannerLink).toBeInTheDocument() | ||
expect(bannerSummaryContent).toBeInTheDocument() | ||
expect(bannerButtonText).toBeInTheDocument() | ||
}) | ||
|
||
it('has no a11y viollations', async () => { | ||
const { container } = render( | ||
<PhaseBanner | ||
bannerBoldText={'bannerBoldText'} | ||
bannerText={'bannerText'} | ||
bannerLink={'bannerLink'} | ||
bannerLinkHref={'bannerLinkHref'} | ||
icon={'bell'} | ||
bannerSummaryTitle={'bannerSummaryTitle'} | ||
bannerSummaryContent={'bannerSummaryContent'} | ||
bannerButtonText={'bannerButtonText'} | ||
bannerButtonLink={'bannerButtonLink'} | ||
popupContent={{ | ||
popupId: 'popup id', | ||
popupTitle: 'pop up title', | ||
popupDescription: 'pop up desc', | ||
popupPrimaryBtn: { id: 'Test Primary Id', text: 'Test Primary Text' }, | ||
popupSecondaryBtn: { id: 'Test secont Id', text: 'Test second Text' }, | ||
}} | ||
></PhaseBanner>, | ||
) | ||
const results = await axe(container) | ||
expect(results).toHaveNoViolations() | ||
}) | ||
}) |
Oops, something went wrong.