Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging to Main (R88608 - MSCA-Dashboard v1.2.0) #758

Merged
merged 58 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
60f725c
Update footer ternary to use publicRuntimeConfig value (#705)
krischarbonneau Jul 15, 2024
cb302dd
Update contact us page to display SIN link (#706)
krischarbonneau Jul 16, 2024
ff3ecb3
Add Root Cert Structure to Dockerfile (#707)
lhr-git Jul 17, 2024
c9228af
Merge branch 'dev' into staging
krischarbonneau Jul 26, 2024
e070ea8
Pin base image version in Dockerfile (#709)
krischarbonneau Jul 29, 2024
87b37a4
Merge branch 'dev' into staging
krischarbonneau Jul 29, 2024
34d5d44
Update next-auth config to validate SIN and UID (#710)
krischarbonneau Aug 8, 2024
e09525c
Merge branch 'dev' into staging
krischarbonneau Aug 8, 2024
a16e897
Swapping from null to a catchall for falsy values (#711)
lhr-git Aug 9, 2024
51b8a29
Swapping from null to a catchall for falsy values (#711) (#712)
lhr-git Aug 9, 2024
be6034c
Snyk updates bundled together (#714)
lhr-git Aug 19, 2024
6960a2d
Merging dev into staging August 19, 2024 (#715)
lhr-git Aug 19, 2024
b4c63de
Merge branch 'dev' into staging
lhr-git Aug 21, 2024
e09d867
Merging main into staging
lhr-git Aug 21, 2024
9e7e0f3
ARB rules will overcome the stream3 meiio path variant, instead of re…
jhslater Sep 26, 2024
5367aa5
cleanup schLists Array
jhslater Sep 26, 2024
b3d899f
Merge pull request #735 from DTS-STN/links-mapper-simplification-2
jhslater Sep 26, 2024
d61ef97
Use next/script and move AA script out of Head
Charles-Pham Oct 8, 2024
a2f9b78
Merge pull request #736 from DTS-STN/aa-double
Charles-Pham Oct 9, 2024
fd81954
Reduce replicaCount and minReplicas to 1 for dev environments.
jhslater Oct 10, 2024
f57c4d3
Merge pull request #737 from DTS-STN/dev_replicaCount_reduction
jhslater Oct 10, 2024
723b54e
Load AA script before interactive to see if there's a race condition
Charles-Pham Oct 17, 2024
d6fd8cb
Merge pull request #738 from DTS-STN/aa-double
Charles-Pham Oct 17, 2024
64308ca
Tests for AA script duplication and comment for why script needs to b…
Charles-Pham Oct 18, 2024
e9c70a9
Fix tests
Charles-Pham Oct 18, 2024
8262fa5
Merge pull request #739 from DTS-STN/aa-double
Charles-Pham Oct 18, 2024
3a5c874
Summary of changes:
jhslater Oct 22, 2024
bdac7b7
cypress e2e test revision to increase count of cards to 6, reflecting…
jhslater Oct 22, 2024
38c77eb
more accuracy on the e2e tests for dashboard card titles
jhslater Oct 22, 2024
ab3ce2a
cdcp has no stuff below most requested. test updated accordingly
jhslater Oct 22, 2024
d639013
revert @jest/core. it is only needed as indirect dependency, and inst…
jhslater Oct 22, 2024
3375de1
Merge pull request #741 from DTS-STN/dependasnyk
jhslater Oct 22, 2024
b38baf4
Add analytics tags for error pages and don't fire the pageLoad beacon…
Charles-Pham Oct 23, 2024
53086d1
Make statusCode optional
Charles-Pham Oct 23, 2024
f58bc08
fix router and tests
Charles-Pham Oct 23, 2024
91bcdd3
fix layout
Charles-Pham Oct 23, 2024
c6c1b12
Merge pull request #742 from DTS-STN/aa-double
Charles-Pham Oct 23, 2024
7ce24a5
push error event
Charles-Pham Oct 23, 2024
507a8db
Merge pull request #743 from DTS-STN/aa-double
Charles-Pham Oct 23, 2024
b107e52
fix aa on language toggle and menus
Charles-Pham Oct 23, 2024
6eb7fac
Merge pull request #744 from DTS-STN/aa-double
Charles-Pham Oct 23, 2024
acb725e
fix aa tags on cdcp
Charles-Pham Oct 25, 2024
16306bf
Merge pull request #745 from DTS-STN/aa-double
Charles-Pham Oct 28, 2024
4b34c99
accomodate cert chain for raoidc sade environments on new 10 dot star…
jhslater Oct 30, 2024
6037c6d
Merge pull request #747 from DTS-STN/ecas_ca_cert_for_dev
jhslater Oct 30, 2024
decdd4c
revert AA error event changes
Charles-Pham Oct 31, 2024
283ad91
Merge pull request #748 from DTS-STN/aa-revert
Charles-Pham Oct 31, 2024
7e42be0
accomodate an additional hostalias in helm
jhslater Nov 5, 2024
0385365
Switch from defaultProps to default parameters. Any string parameter …
Charles-Pham Nov 5, 2024
3f33b91
Merge pull request #749 from DTS-STN/default-param
Charles-Pham Nov 6, 2024
6bd269b
Fix alerts not appearing
Charles-Pham Nov 8, 2024
f11d0cc
Merge pull request #750 from DTS-STN/default-param
jhslater Nov 8, 2024
6a98cfe
Merge pull request #751 from DTS-STN/hostaliases_range
jhslater Nov 8, 2024
e75f40f
Add cdcp to contact us (#752)
Charles-Pham Nov 19, 2024
ba6cd1b
Change the CAL link to open in the same tab (#753)
abalogh-esdc Nov 20, 2024
11a2927
correction to markup
jhslater Nov 25, 2024
d0b92ef
Merge pull request #757 from DTS-STN/dev
jhslater Nov 25, 2024
272ad74
Merge branch 'main' into staging
jhslater Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.16.0-alpine3.20 AS base
FROM node:20.17.0-alpine3.20 AS base
WORKDIR /base
COPY package*.json ./
RUN npm ci && npm cache clean --force
Expand All @@ -11,6 +11,8 @@ ARG HOSTALIAS_CERT
ENV HOSTALIAS_CERT=$HOSTALIAS_CERT
ARG HOSTALIAS_ROOT_CERT
ENV HOSTALIAS_ROOT_CERT=$HOSTALIAS_ROOT_CERT
ARG AUTH_ECAS_CA
ENV AUTH_ECAS_CA=$AUTH_ECAS_CA
ARG LOGGING_LEVEL=info
ENV LOGGING_LEVEL=$LOGGING_LEVEL
ARG AEM_GRAPHQL_ENDPOINT=https://www.canada.ca/graphql/execute.json/decd-endc/
Expand All @@ -34,6 +36,11 @@ sed 's/\\n/\n/g' | \
xargs > \
/usr/local/share/ca-certificates/env.crt && \
chmod 644 /usr/local/share/ca-certificates/env.crt && \
echo ${AUTH_ECAS_CA} | \
sed 's/\\n/\n/g' | \
xargs > \
/usr/local/share/ca-certificates/ecas_env.crt && \
chmod 644 /usr/local/share/ca-certificates/ecas_env.crt && \
mkdir -p /etc/ssl/certs/ && \
echo ${HOSTALIAS_ROOT_CERT} | \
sed 's/\\n/\n/g' | \
Expand All @@ -42,7 +49,7 @@ xargs > \
chmod 644 /etc/ssl/certs/root.crt && \
npm run build

FROM node:20.16.0-alpine3.20 AS production
FROM node:20.17.0-alpine3.20 AS production
ENV NODE_ENV=production

ARG user=nodeuser
Expand All @@ -52,6 +59,9 @@ ARG home=/srv/app
ARG MSCA_NG_CERT_LOCATION=/usr/local/share/ca-certificates/env.crt
ENV MSCA_NG_CERT_LOCATION=$MSCA_NG_CERT_LOCATION

ARG ECAS_CERT_LOCATION=/usr/local/share/ca-certificates/ecas_env.crt
ENV ECAS_CERT_LOCATION=$ECAS_CERT_LOCATION

RUN addgroup \
-S ${group} \
--gid 1001 && \
Expand All @@ -67,6 +77,7 @@ WORKDIR ${home}

COPY --from=build /etc/ssl/certs/root.crt /etc/ssl/certs/root.crt
COPY --from=build --chown=${user}:${group} /usr/local/share/ca-certificates/env.crt ${MSCA_NG_CERT_LOCATION}
COPY --from=build --chown=${user}:${group} /usr/local/share/ca-certificates/ecas_env.crt ${ECAS_CERT_LOCATION}

RUN apk update && \
apk add ca-certificates && \
Expand Down Expand Up @@ -131,6 +142,8 @@ ENV AUTH_DISABLED=$AUTH_DISABLED

ARG AUTH_ECAS_GLOBAL_LOGOUT_URL
ENV AUTH_ECAS_GLOBAL_LOGOUT_URL=$AUTH_ECAS_GLOBAL_LOGOUT_URL

ENV NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/ecas_env.crt
# ECAS/next-auth env end

ARG PORT=3000
Expand Down
2 changes: 2 additions & 0 deletions __tests__/components/Card.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ describe('Card', () => {
const results = await axe(container)
expect(results).toHaveNoViolations()
})

// TODO: Add a test that if an alert is added it actually appears
})
4 changes: 4 additions & 0 deletions __tests__/components/Layout.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ describe('Layout with default text', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))

it.skip('Layout contains Symbol of GoC', () => {
Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/contact-us-pages.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ describe.skip('Dynamic Contact Us Page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
12 changes: 8 additions & 4 deletions __tests__/pages/decision-reviews.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ describe('Decision Reviews page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand All @@ -94,10 +98,10 @@ describe('Decision Reviews page', () => {
meta={{}}
breadCrumbItems={content.breadcrumb}
langToggleLink={''}
/>
/>,
)
const DecisionReviewsDiv = screen.getByTestId(
'decision-reviewsContent-test'
'decision-reviewsContent-test',
)
expect(DecisionReviewsDiv).toBeInTheDocument()
})
Expand All @@ -112,10 +116,10 @@ describe('Decision Reviews page', () => {
meta={{}}
breadCrumbItems={content.breadcrumb}
langToggleLink={''}
/>
/>,
)
const DecisionReviewsDiv = screen.getByTestId(
'decision-reviewsContent-test'
'decision-reviewsContent-test',
)
expect(DecisionReviewsDiv).toBeInTheDocument()
})
Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ describe('index page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ describe('login page', () => {
useRouter.mockImplementation(() => ({
pathname: '/auth/login',
asPath: '/auth/login',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/logout.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ describe('logout page', () => {
useRouter.mockImplementation(() => ({
pathname: '/auth/logout',
asPath: '/auth/logout',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/my-dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ describe('My Dashboard page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
4 changes: 4 additions & 0 deletions __tests__/pages/profile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ describe('My Profile page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand Down
10 changes: 7 additions & 3 deletions __tests__/pages/security-settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ describe('Security Settings page', () => {
useRouter.mockImplementation(() => ({
pathname: '/',
asPath: '/',
events: {
on: jest.fn(),
off: jest.fn(),
},
}))
})

Expand All @@ -63,7 +67,7 @@ describe('Security Settings page', () => {
meta={{}}
breadCrumbItems={content.breadcrumb}
langToggleLink={''}
/>
/>,
)
const SecuritySettingsDiv = screen.getByTestId('securityContent-test')
expect(SecuritySettingsDiv).toBeInTheDocument()
Expand All @@ -79,7 +83,7 @@ describe('Security Settings page', () => {
meta={{}}
breadCrumbItems={content.breadcrumb}
langToggleLink={''}
/>
/>,
)
const SecuritySettingsDiv = screen.getByTestId('securityContent-test')
expect(SecuritySettingsDiv).toBeInTheDocument()
Expand All @@ -95,7 +99,7 @@ describe('Security Settings page', () => {
meta={{}}
breadCrumbItems={content.breadcrumb}
langToggleLink={''}
/>
/>,
)
const securityQuestionsLink = screen.getByTestId('securityQuestionsLink')
expect(securityQuestionsLink).toBeInTheDocument()
Expand Down
6 changes: 3 additions & 3 deletions components/BackToButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ const BackToButton = ({
buttonHref,
buttonId,
buttonLinkText,
refPageAA,
id,
refPageAA = 'mscaPlaceholder',
id = 'mscaPlaceholder',
}: BackToButtonProps) => {
return (
<>
<div>
<Link
href={buttonHref}
id={buttonId}
className="inline-block my-4 py-2.5 px-3.5 font-display text-xl rounded bg-gray-30a text-deep-blue-60b hover:bg-gray-50a hover:cursor-pointer focus:ring focus:ring-offset-4 ring-deep-blue-60f"
className="my-4 inline-block rounded bg-gray-30a px-3.5 py-2.5 font-display text-xl text-deep-blue-60b ring-deep-blue-60f hover:cursor-pointer hover:bg-gray-50a focus:ring focus:ring-offset-4"
data-gc-analytics-customclick={`${refPageAA}:${id}`}
>
{buttonLinkText}
Expand Down
16 changes: 2 additions & 14 deletions components/BenefitTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const BenefitTasks = ({
locale,
taskList,
dataCy,
refPageAA,
acronym,
refPageAA = 'mscaPlaceholder',
acronym = 'mscaPlaceholder',
}: BenefitTasksProps) => {
const newTabTaskExceptions = [
'https://www.canada.ca/en/services/benefits/ei/employment-insurance-reporting.html',
Expand Down Expand Up @@ -104,16 +104,4 @@ const BenefitTasks = ({
</div>
)
}

BenefitTasks.defaultProps = {
taskList: [
{
tasks: [
{
icon: 'question-circle', // To ensure a value is used for FontAwesome icons
},
],
},
],
}
export default BenefitTasks
6 changes: 5 additions & 1 deletion components/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export interface BreadcrumbProps {
refPageAA: string
}

const Breadcrumb = ({ id, items, refPageAA }: BreadcrumbProps) => {
const Breadcrumb = ({
id, // TODO: Provide a default value once this is actually mapped in
items,
refPageAA = 'mscaPlaceholder',
}: BreadcrumbProps) => {
return (
<nav className="py-6" aria-label="Breadcrumb-Fil d’ariane" id={id}>
<ul className="block font-body text-base leading-[23px] text-deep-blue-dark">
Expand Down
23 changes: 7 additions & 16 deletions components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface ButtonProps {
style?: 'supertask' | 'primary' | 'secondary' | 'danger' | 'link' | 'none'
text: string
icon?: string
iconAltText: string
iconAltText?: string
iconEnd?: boolean
href?: string
type?: 'submit' | 'reset' | 'button'
Expand All @@ -19,20 +19,20 @@ interface ButtonProps {
}

const Button = ({
id,
style,
text,
id = 'mscaPlaceholder',
style = 'supertask',
text = 'mscaPlaceholder',
icon,
iconAltText,
iconAltText = 'mscaPlaceholder',
iconEnd,
href,
href = 'no ref',
type,
onClick,
disabled,
className,
attributes,
children,
refPageAA,
refPageAA = 'mscaPlaceholder',
}: ButtonProps) => {
const primary =
'text-white bg-blue-primary text-xl hover:bg-deep-blue-focus active:bg-blue-pressed rounded focus:ring focus:ring-offset-4 focus:ring-deep-blue-60f focus:ring-bg-deep-blue-focus'
Expand Down Expand Up @@ -136,13 +136,4 @@ const Button = ({
</a>
)
}

Button.defaultProps = {
id: 'btn1',
style: 'supertask',
text: 'default',
href: 'no ref',
iconAltText: 'default',
}

export default Button
Loading
Loading