Skip to content

Commit

Permalink
Tweak playwright config (#1758)
Browse files Browse the repository at this point in the history
* wait why would we not run tests in parallel in CI

* curious what it does when we don't say anything

* tell github actions to use 100% of available cores
  • Loading branch information
david-crespo authored Sep 7, 2023
1 parent 6582b24 commit 81e3820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 81e3820

Please sign in to comment.