chore: drive-by fixes for the snapshotPathTemplate (#18715)
- Use `snapshotPathTemplate` for docker screenshots in html-reporter - Mark the snapshot path template test as slow since it re-spawns worker for each project. - Fix docker smoke tests
This commit is contained in:
parent
56d7d47d43
commit
db826c9c8c
11
.github/workflows/tests_secondary.yml
vendored
11
.github/workflows/tests_secondary.yml
vendored
|
|
@ -816,9 +816,14 @@ jobs:
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npx playwright install --with-deps
|
- run: npx playwright install --with-deps
|
||||||
- run: ./utils/docker/build.sh --amd64 focal playwright:localbuild
|
- run: |
|
||||||
- run: PWTEST_DOCKER_BASE_IMAGE=playwright:localbuild npx playwright docker build
|
./utils/docker/build.sh --amd64 focal $PWTEST_DOCKER_BASE_IMAGE
|
||||||
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run dtest
|
npx playwright docker build
|
||||||
|
nohup npx playwright docker start &
|
||||||
|
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --grep '@smoke'
|
||||||
|
env:
|
||||||
|
PLAYWRIGHT_DOCKER: 1
|
||||||
|
PWTEST_DOCKER_BASE_IMAGE: playwright:localbuild
|
||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
if: always()
|
if: always()
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dtest": "cross-env PLAYWRIGHT_DOCKER=1 playwright test --config=tests/library/playwright.config.ts --grep '@smoke'",
|
|
||||||
"ctest": "playwright test --config=tests/library/playwright.config.ts --project=chromium",
|
"ctest": "playwright test --config=tests/library/playwright.config.ts --project=chromium",
|
||||||
"ftest": "playwright test --config=tests/library/playwright.config.ts --project=firefox",
|
"ftest": "playwright test --config=tests/library/playwright.config.ts --project=firefox",
|
||||||
"wtest": "playwright test --config=tests/library/playwright.config.ts --project=webkit",
|
"wtest": "playwright test --config=tests/library/playwright.config.ts --project=webkit",
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const config: PlaywrightTestConfig = {
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
retries: process.env.CI ? 2 : 0,
|
retries: process.env.CI ? 2 : 0,
|
||||||
ignoreSnapshots: !process.env.PLAYWRIGHT_DOCKER,
|
ignoreSnapshots: !process.env.PLAYWRIGHT_DOCKER,
|
||||||
|
snapshotPathTemplate: '{testDir}/__screenshots__/{projectName}/{testFilePath}/{arg}{ext}',
|
||||||
reporter: 'html',
|
reporter: 'html',
|
||||||
use: {
|
use: {
|
||||||
ctPort: 3101,
|
ctPort: 3101,
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ async function getSnapshotPaths(runInlineTest, testInfo, playwrightConfig, pathA
|
||||||
}
|
}
|
||||||
|
|
||||||
test('tokens should expand property', async ({ runInlineTest }, testInfo) => {
|
test('tokens should expand property', async ({ runInlineTest }, testInfo) => {
|
||||||
|
test.slow();
|
||||||
const snapshotPath = await getSnapshotPaths(runInlineTest, testInfo, {
|
const snapshotPath = await getSnapshotPaths(runInlineTest, testInfo, {
|
||||||
projects: [{
|
projects: [{
|
||||||
name: 'proj1',
|
name: 'proj1',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue