Skip to content

Commit

Permalink
[Tech] use chrome for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Apr 26, 2024
1 parent cf10657 commit 14ff000
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/cicd-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MONITORENV_VERSION: ${{ needs.version.outputs.VERSION }}
VERSION: ${{needs.version.outputs.VERSION}}
PUPPETEER_SKIP_DOWNLOAD: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -243,9 +242,6 @@ jobs:
run: npm ci
working-directory: ./frontend

- name: Install Firefox
run: npx puppeteer browsers install firefox

- name: Run docker images
run: |
make run-infra-for-frontend-tests
Expand Down
2 changes: 1 addition & 1 deletion frontend/puppeteer/e2e/missions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Missions Form', () => {
/* eslint-disable no-restricted-syntax */
for (const page of [pageA, pageB]) {
await page.goto(URL)
await wait(1000)
await wait(2000)

setPuppeteerEnvironment(page)

Expand Down
6 changes: 3 additions & 3 deletions frontend/puppeteer/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export default async () => {
args: [
`--window-size=${WIDTH},${HEIGHT}`,
`--window-position=${WIDTH * i},0`,
'--enable-features=ExperimentalJavaScript'
'--enable-features=ExperimentalJavaScript',
'--enable-gpu'
],
defaultViewport: null,
headless: process.env.IS_HEADLESS === 'true',
product: 'firefox'
headless: process.env.IS_HEADLESS === 'true'
})

const version = await browser.version()
Expand Down
2 changes: 2 additions & 0 deletions infra/docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ FROM node:20-alpine as buildFront

ENV DEBIAN_FRONTEND=noninteractive
ENV DISABLE_ESLINT_PLUGIN=true
ENV PUPPETEER_DOWNLOAD_BASE_URL=https://storage.googleapis.com/chrome-for-testing-public


ARG VERSION
ARG ENV_PROFILE
Expand Down

0 comments on commit 14ff000

Please sign in to comment.