Skip to content

Commit 8fefac9

Browse files
authored
test: roll to [email protected] (#6789)
1 parent a7afcf2 commit 8fefac9

File tree

137 files changed

+78
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+78
-55
lines changed

.github/workflows/tests_secondary.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ jobs:
148148
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
149149
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
150150
# Wrap `npm run` in a subshell to redirect STDERR to file.
151-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }} --headed"
151+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
152152
if: ${{ always() }}
153+
env:
154+
HEADFUL: 1
153155
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
154156
if: always()
155157
- uses: actions/upload-artifact@v1
@@ -177,7 +179,9 @@ jobs:
177179
- run: node lib/cli/cli install-deps chromium
178180
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
179181
# Wrap `npm run` in a subshell to redirect STDERR to file.
180-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest -- --mode=${{ matrix.mode }}"
182+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
183+
env:
184+
PWTEST_MODE: ${{ matrix.mode }}
181185
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
182186
if: always()
183187
- uses: actions/upload-artifact@v1
@@ -205,7 +209,9 @@ jobs:
205209
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
206210
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
207211
# Wrap `npm run` in a subshell to redirect STDERR to file.
208-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }} --video"
212+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
213+
env:
214+
PWTEST_VIDEO: 1
209215
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
210216
if: always()
211217
- uses: actions/upload-artifact@v1
@@ -264,7 +270,9 @@ jobs:
264270
- run: node lib/cli/cli install ffmpeg
265271
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
266272
# Wrap `npm run` in a subshell to redirect STDERR to file.
267-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest -- --channel=chrome"
273+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
274+
env:
275+
PWTEST_CHANNEL: chrome
268276
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
269277
if: always()
270278
- uses: actions/upload-artifact@v1
@@ -290,8 +298,10 @@ jobs:
290298
- run: npm run build
291299
# This only created problems, should we move ffmpeg back into npm?
292300
- run: node lib/cli/cli install ffmpeg
293-
- run: npm run ctest -- --channel=chrome
301+
- run: npm run ctest
294302
shell: bash
303+
env:
304+
PWTEST_CHANNEL: chrome
295305
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
296306
if: always()
297307
shell: bash
@@ -315,7 +325,9 @@ jobs:
315325
- run: npm run build
316326
# This only created problems, should we move ffmpeg back into npm?
317327
- run: node lib/cli/cli install ffmpeg
318-
- run: npm run ctest -- --channel=chrome
328+
- run: npm run ctest
329+
env:
330+
PWTEST_CHANNEL: chrome
319331
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
320332
if: always()
321333
- uses: actions/upload-artifact@v1
@@ -340,7 +352,9 @@ jobs:
340352
- run: node lib/cli/cli install ffmpeg firefox-stable chromium
341353
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
342354
# Wrap `npm run` in a subshell to redirect STDERR to file.
343-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ftest -- --channel=firefox-stable"
355+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ftest"
356+
env:
357+
PWTEST_CHANNEL: firefox-stable
344358
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
345359
if: always()
346360
- uses: actions/upload-artifact@v1
@@ -365,8 +379,10 @@ jobs:
365379
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
366380
- run: npm run build
367381
- run: node lib/cli/cli install ffmpeg firefox-stable chromium
368-
- run: npm run ftest -- --channel=firefox-stable
382+
- run: npm run ftest
369383
shell: bash
384+
env:
385+
PWTEST_CHANNEL: firefox-stable
370386
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
371387
if: always()
372388
shell: bash
@@ -389,7 +405,9 @@ jobs:
389405
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
390406
- run: npm run build
391407
- run: node lib/cli/cli install ffmpeg firefox-stable chromium
392-
- run: npm run ftest -- --channel=firefox-stable
408+
- run: npm run ftest
409+
env:
410+
PWTEST_CHANNEL: firefox-stable
393411
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
394412
if: always()
395413
- uses: actions/upload-artifact@v1
@@ -415,8 +433,10 @@ jobs:
415433
- run: npm run build
416434
# This only created problems, should we move ffmpeg back into npm?
417435
- run: node lib/cli/cli install ffmpeg
418-
- run: npm run ctest -- --channel=msedge
436+
- run: npm run ctest
419437
shell: bash
438+
env:
439+
PWTEST_CHANNEL: msedge
420440
- uses: actions/upload-artifact@v1
421441
if: ${{ always() }}
422442
with:
@@ -463,7 +483,9 @@ jobs:
463483
- run: node lib/cli/cli install ffmpeg
464484
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
465485
# Wrap `npm run` in a subshell to redirect STDERR to file.
466-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest -- --channel=chrome-beta"
486+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
487+
env:
488+
PWTEST_CHANNEL: chrome-beta
467489
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
468490
if: always()
469491
- uses: actions/upload-artifact@v1
@@ -490,8 +512,10 @@ jobs:
490512
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
491513
- run: npm run build
492514
- run: node lib/cli/cli install ffmpeg
493-
- run: npm run ctest -- --channel=chrome-beta
515+
- run: npm run ctest
494516
shell: bash
517+
env:
518+
PWTEST_CHANNEL: chrome-beta
495519
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
496520
if: always()
497521
shell: bash
@@ -515,7 +539,9 @@ jobs:
515539
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
516540
- run: npm run build
517541
- run: node lib/cli/cli install ffmpeg
518-
- run: npm run ctest -- --channel=chrome-beta
542+
- run: npm run ctest
543+
env:
544+
PWTEST_CHANNEL: chrome-beta
519545
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
520546
if: always()
521547
- uses: actions/upload-artifact@v1

package-lock.json

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"eslint-plugin-notice": "^0.9.10",
8181
"eslint-plugin-react-hooks": "^4.2.0",
8282
"file-loader": "^6.1.0",
83-
"folio": "=0.4.0-alpha19",
83+
"folio": "=0.4.0-alpha21",
8484
"formidable": "^1.2.2",
8585
"html-webpack-plugin": "^4.4.1",
8686
"ncp": "^2.0.0",

tests/config/android.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const outputDir = path.join(__dirname, '..', '..', 'test-results');
2525
const testDir = path.join(__dirname, '..');
2626
const config: folio.Config<CommonOptions & PlaywrightOptions> = {
2727
testDir,
28-
snapshotDir: '__snapshots__',
2928
outputDir,
3029
timeout: 120000,
3130
globalTimeout: 7200000,

tests/config/baseTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const baseFixtures: folio.Fixtures<{ __baseSetup: void }, BaseOptions & BaseFixt
124124
isMac: [ process.platform === 'darwin', { scope: 'worker' } ],
125125
isLinux: [ process.platform === 'linux', { scope: 'worker' } ],
126126
__baseSetup: [ async ({ browserName }, run, testInfo) => {
127-
testInfo.snapshotPathSegment = browserName;
127+
testInfo.snapshotSuffix = browserName;
128128
await run();
129129
}, { auto: true } ],
130130
};

tests/config/default.config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ const pageFixtures = {
3838
isElectron: false,
3939
};
4040

41-
const mode = (folio.registerCLIOption('mode', 'Transport mode: default, driver or service').value || 'default') as ('default' | 'driver' | 'service');
42-
const headed = folio.registerCLIOption('headed', 'Run tests in headed mode (default: headless)', { type: 'boolean' }).value || !!process.env.HEADFUL;
43-
const channel = folio.registerCLIOption('channel', 'Browser channel (default: no channel)').value as any;
44-
const video = !!folio.registerCLIOption('video', 'Record videos for all tests', { type: 'boolean' }).value;
41+
const mode = (process.env.PWTEST_MODE || 'default') as ('default' | 'driver' | 'service');
42+
const headed = !!process.env.HEADFUL;
43+
const channel = process.env.PWTEST_CHANNEL as any;
44+
const video = !!process.env.PWTEST_VIDEO;
4545

4646
const outputDir = path.join(__dirname, '..', '..', 'test-results');
4747
const testDir = path.join(__dirname, '..');
4848
const config: folio.Config<CommonOptions & PlaywrightOptions> = {
4949
testDir,
50-
snapshotDir: '__snapshots__',
5150
outputDir,
5251
timeout: video || process.env.PWTRACE ? 60000 : 30000,
5352
globalTimeout: 5400000,

tests/config/electron.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const outputDir = path.join(__dirname, '..', '..', 'test-results');
2525
const testDir = path.join(__dirname, '..');
2626
const config: folio.Config<CommonOptions & PlaywrightOptions> = {
2727
testDir,
28-
snapshotDir: '__snapshots__',
2928
outputDir,
3029
timeout: 30000,
3130
globalTimeout: 5400000,

0 commit comments

Comments
 (0)