Skip to content

Tweak playwright config #1758

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

Merged
merged 4 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/lintBuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- name: Run Playwright browser tests
run: npx playwright test --workers=2 --project=${{matrix.browser}}
run: npx playwright test --project=${{matrix.browser}}
- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion app/test/e2e/image-upload.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ test.describe('Image upload', () => {
// now let's try canceling by clicking out on the background over the side modal
await page.getByLabel('4096').click()

await sleep(100)
await sleep(300)

// without the onFocusOutside fix this is a higher number
expect(confirmCount).toEqual(2)
Expand Down
8 changes: 4 additions & 4 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { devices } from '@playwright/test'
const config: PlaywrightTestConfig = {
testDir: './app/test/e2e',
testMatch: /\.e2e\.ts/,
/* Fail the build on CI if you accidentally left test.only in the source code. */
// Fail the build on CI if you accidentally left test.only in the source code
forbidOnly: !!process.env.CI,
/* Retry on CI only */
// Retry on CI only
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
// use all available cores (2) on github actions. default is 50%, use that locally
workers: process.env.CI ? '100%' : undefined,
timeout: 2 * 60 * 1000, // 2 minutes, surely overkill
fullyParallel: true,
use: {
Expand Down