diff --git a/docs/src/test-api/class-fullconfig.md b/docs/src/test-api/class-fullconfig.md index c52a7307bb..923c9fa858 100644 --- a/docs/src/test-api/class-fullconfig.md +++ b/docs/src/test-api/class-fullconfig.md @@ -112,10 +112,6 @@ Base directory for all relative paths used in the reporters. See [`property: TestConfig.shard`]. -## property: FullConfig.skipAfterAnyFailure -* since: v1.51 -- type: <[boolean]> - ## property: FullConfig.updateSnapshots * since: v1.10 - type: <[UpdateSnapshots]<"all"|"changed"|"missing"|"none">> diff --git a/packages/playwright/src/common/config.ts b/packages/playwright/src/common/config.ts index bcb8442e03..e443f86a29 100644 --- a/packages/playwright/src/common/config.ts +++ b/packages/playwright/src/common/config.ts @@ -49,6 +49,7 @@ export class FullConfigInternal { readonly projects: FullProjectInternal[] = []; readonly singleTSConfigPath?: string; readonly populateGitInfo: boolean; + readonly skipAfterAnyFailure: boolean; cliArgs: string[] = []; cliGrep: string | undefined; cliGrepInvert: string | undefined; @@ -87,6 +88,8 @@ export class FullConfigInternal { // so that plugins such as gitCommitInfoPlugin can populate metadata once. userConfig.metadata = userConfig.metadata || {}; + this.skipAfterAnyFailure = userConfig.skipAfterAnyFailure ?? true; + this.config = { configFile: resolvedConfigFile, rootDir: pathResolve(configDir, userConfig.testDir) || configDir, @@ -105,7 +108,6 @@ export class FullConfigInternal { quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false), projects: [], shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null), - skipAfterAnyFailure: userConfig.skipAfterAnyFailure ?? true, updateSnapshots: takeFirst(configCLIOverrides.updateSnapshots, userConfig.updateSnapshots, 'missing'), updateSourceMethod: takeFirst(configCLIOverrides.updateSourceMethod, userConfig.updateSourceMethod, 'patch'), version: require('../../package.json').version, diff --git a/packages/playwright/src/worker/workerMain.ts b/packages/playwright/src/worker/workerMain.ts index 7c89ac8526..140a39a20d 100644 --- a/packages/playwright/src/worker/workerMain.ts +++ b/packages/playwright/src/worker/workerMain.ts @@ -394,7 +394,7 @@ export class WorkerMain extends ProcessRunner { const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout); const afterHooksSlot = { timeout: afterHooksTimeout, elapsed: 0 }; - const FAILURE_AND_SkIP_NOW = testInfo._isFailure() && this._config.config.skipAfterAnyFailure; + const FAILURE_AND_SkIP_NOW = testInfo._isFailure() && this._config.skipAfterAnyFailure; await testInfo._runAsStage({ title: 'After Hooks', stepInfo: { category: 'hook' } }, async () => { let firstAfterHooksError: Error | undefined; diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 8de3cc17a5..14f2f75f02 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -1949,8 +1949,6 @@ export interface FullConfig { current: number; }; - skipAfterAnyFailure: boolean; - /** * See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots). */