[e2e tests] Tweak Playwright config - retries and test artifacts (#49148)

This commit is contained in:
Adrian Moldovan 2024-07-05 14:38:49 +01:00 committed by GitHub
parent 615513144d
commit 178466aa06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 17 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev

View File

@ -236,11 +236,12 @@
"testType": "e2e",
"command": "test:e2e:with-env default",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
"--shard=1/6",
"--shard=2/6",
"--shard=3/6",
"--shard=4/6",
"--shard=5/6",
"--shard=6/6"
],
"changes": [
"client/admin/config/*.json",
@ -574,16 +575,15 @@
"testType": "e2e",
"command": "test:e2e:blocks",
"shardingArguments": [
"--shard=1/10",
"--shard=2/10",
"--shard=3/10",
"--shard=4/10",
"--shard=5/10",
"--shard=6/10",
"--shard=7/10",
"--shard=8/10",
"--shard=9/10",
"--shard=10/10"
"--shard=1/9",
"--shard=2/9",
"--shard=3/9",
"--shard=4/9",
"--shard=5/9",
"--shard=6/9",
"--shard=7/9",
"--shard=8/9",
"--shard=9/9"
],
"changes": [
"src/Blocks/**",

View File

@ -23,6 +23,12 @@ const reporter = [
`${ testsRootPath }/test-results/allure-results`,
detail: true,
suiteTitle: true,
environmentInfo: {
Node: process.version,
OS: process.platform,
WP: process.env.WP_VERSION,
CI: process.env.CI,
},
},
],
[
@ -58,7 +64,7 @@ const config = {
globalSetup: require.resolve( './global-setup' ),
globalTeardown: require.resolve( './global-teardown' ),
testDir: `${ testsRootPath }/tests`,
retries: CI ? 2 : 0,
retries: CI ? 1 : 0,
repeatEach: REPEAT_EACH ? Number( REPEAT_EACH ) : 1,
workers: 1,
reportSlowTests: { max: 5, threshold: 30 * 1000 }, // 30 seconds threshold
@ -70,7 +76,7 @@ const config = {
stateDir: `${ testsRootPath }/.state/`,
trace:
/^https?:\/\/localhost/.test( BASE_URL ) || ! CI
? 'retain-on-failure'
? 'retain-on-first-failure'
: 'off',
video: 'retain-on-failure',
viewport: { width: 1280, height: 720 },