Skip to content

Commit

Permalink
Merge pull request #578 from DTS-STN/staging
Browse files Browse the repository at this point in the history
Update Main from Staging (March 7th, 2024)
  • Loading branch information
krischarbonneau authored Mar 7, 2024
2 parents 109ed76 + 31f4640 commit aaac6a0
Show file tree
Hide file tree
Showing 75 changed files with 5,178 additions and 4,989 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install
run: npm ci
Expand All @@ -31,7 +31,7 @@ jobs:
AEM_GRAPHQL_ENDPOINT: ${{secrets.AEM_GRAPHQL_ENDPOINT}}

- name: OWASP ZAP FULL Scan
uses: zaproxy/action-full-scan@v0.4.0
uses: zaproxy/action-full-scan@v0.9.0
with:
target: "http://localhost:3000"
fail_action: "false"
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/default-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🔔
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Install
run: npm install
Expand All @@ -32,12 +32,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🔔
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Install
run: npm install
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Install
run: npm install
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
run: npm run report:generate

- name: Store Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: e2e-test-report
path: report
Expand All @@ -126,18 +126,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'javascript'

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

deploy_test_results:
name: Get and Deploy Artifacts
Expand All @@ -146,9 +146,9 @@ jobs:
runs-on: ubuntu-latest
#dependabot doesn't get write access
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: test_results
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/load.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run k6 local test
uses: grafana/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'

- name: Add Comment
if: steps.fc.outputs.comment-id == 0
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
Expand Down
7 changes: 4 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"semi": false,
tabWidth: 2,
singleQuote: true,
quoteProps: "consistent"
"tabWidth": 2,
"singleQuote": true,
"quoteProps": "consistent",
"plugins": ["prettier-plugin-tailwindcss"]
}
6 changes: 3 additions & 3 deletions __tests__/components/BenefitTasks.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'

import { axe, toHaveNoViolations } from 'jest-axe'
import BenefitTasks from '../../components/BenefitTasks'
Expand Down Expand Up @@ -33,7 +33,7 @@ describe('BenefitTasks', () => {
taskList={taskListTest}
dataCy="task-group-list-test"
refPageAA={'test'}
/>
/>,
)
const testid = screen.getByTestId('benefitTasks-test')
expect(testid).toBeInTheDocument()
Expand All @@ -46,7 +46,7 @@ describe('BenefitTasks', () => {
taskList={taskListTest}
dataCy="task-group-list-test"
refPageAA={'test'}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
10 changes: 5 additions & 5 deletions __tests__/components/Breadcrumb.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @jest-environment jsdom
*/
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Breadcrumb from '../../components/Breadcrumb'

Expand All @@ -21,7 +21,7 @@ describe('BreadCrumb', () => {
<Breadcrumb
id="breadcrumbID"
items={[{ text: 'Canada.ca', link: '/' }]}
/>
/>,
)
expect(primary).toBeTruthy()
})
Expand All @@ -36,7 +36,7 @@ describe('BreadCrumb', () => {
{ text: 'Link2', link: '/' },
{ text: 'Link3', link: '/' },
]}
/>
/>,
)
expect(withItems).toBeTruthy()
})
Expand All @@ -52,7 +52,7 @@ describe('BreadCrumb', () => {
{ text: 'Max length of breadcrumb 28', link: '/' },
{ text: 'Link3', link: '/' },
]}
/>
/>,
)
expect(withItemsWithLongText).toBeTruthy()
})
Expand All @@ -62,7 +62,7 @@ describe('BreadCrumb', () => {
<Breadcrumb
id="breadcrumbID"
items={[{ text: 'Canada.ca', link: '/' }]}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Button.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Button from '../../components/Button'

Expand Down Expand Up @@ -29,7 +29,7 @@ describe('Button', () => {
onClick={() => {
return true
}}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/Card.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Card from '../../components/Card'

Expand All @@ -13,7 +13,7 @@ describe('Card', () => {
viewMoreLessCaption={`Card Caption`}
locale="en"
programUniqueId={'test'}
/>
/>,
)
const title = screen.getByText('Card Title')
const caption = screen.getByText('Card Caption')
Expand All @@ -28,7 +28,7 @@ describe('Card', () => {
viewMoreLessCaption={`Card Caption`}
locale="en"
programUniqueId={'test'}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/Collapse.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Collapse from '../../components/Collapse'

Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/ContextualAlert.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import ContextualAlert from '../../components/ContextualAlert'

Expand All @@ -16,7 +16,7 @@ describe('ContextualAlert', () => {
type="info"
message_heading="Information"
message_body="You may wish to print this page..."
/>
/>,
)
it('renders this Contectual Alert component', () => {
const message_heading = screen.getByText('Information')
Expand All @@ -39,7 +39,7 @@ describe('ContextualAlert', () => {
type="info"
message_heading="Information"
message_body="You may wish to print this page..."
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/Date.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Date from '../../components/Date'

Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/ErrorPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { render } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import ErrorPage from '../../components/ErrorPage'
import { axe, toHaveNoViolations } from 'jest-axe'

Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/ExitBetaModal.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import ExitBeta from '../../components/ExitBeta'

Expand All @@ -20,7 +20,7 @@ describe('Exit Beta Modal', () => {
id: 'Test Secondary Id',
text: 'Test Secondary Text',
}}
/>
/>,
)
const title = screen.getByText('Test Title')
const description = screen.getByText('Test Description')
Expand All @@ -45,7 +45,7 @@ describe('Exit Beta Modal', () => {
id: 'Test Secondary Id',
text: 'Test Secondary Text',
}}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/components/Header.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @jest-environment jsdom
*/
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Header from '../../components/Header'

Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/Heading.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Heading from '../../components/Heading'

Expand All @@ -16,7 +16,7 @@ describe('Heading', () => {
locale="en"
id={'id'}
dataTestId={'data test ID'}
/>
/>,
)
const title = screen.getByText('title')
const fromText = screen.getByText('from Text')
Expand All @@ -34,7 +34,7 @@ describe('Heading', () => {
locale="en"
id={'id'}
dataTestId={'data test ID'}
/>
/>,
)
const results = await axe(container)
expect(results).toHaveNoViolations()
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Language.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @jest-environment jsdom
*/
import { render, screen, waitFor } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import '@testing-library/jest-dom'
import { axe, toHaveNoViolations } from 'jest-axe'
import Language from '../../components/Language'

Expand All @@ -25,7 +25,7 @@ describe('Language', () => {

it("renders 'EN' without problems", async () => {
const englishAbbr = render(
<Language id="enAbbr" lang="fr" path="/en" abbr="EN" />
<Language id="enAbbr" lang="fr" path="/en" abbr="EN" />,
)
await waitFor(() => expect(englishAbbr).toBeTruthy())
expect(screen.getByText('EN')).toBeInTheDocument
Expand Down
Loading

0 comments on commit aaac6a0

Please sign in to comment.