try again (#3)
This commit is contained in:
parent
7e724fda19
commit
aa91317c96
|
|
@ -112,10 +112,6 @@ Base directory for all relative paths used in the reporters.
|
||||||
|
|
||||||
See [`property: TestConfig.shard`].
|
See [`property: TestConfig.shard`].
|
||||||
|
|
||||||
## property: FullConfig.skipAfterAnyFailure
|
|
||||||
* since: v1.51
|
|
||||||
- type: <[boolean]>
|
|
||||||
|
|
||||||
## property: FullConfig.updateSnapshots
|
## property: FullConfig.updateSnapshots
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
- type: <[UpdateSnapshots]<"all"|"changed"|"missing"|"none">>
|
- type: <[UpdateSnapshots]<"all"|"changed"|"missing"|"none">>
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ export class FullConfigInternal {
|
||||||
readonly projects: FullProjectInternal[] = [];
|
readonly projects: FullProjectInternal[] = [];
|
||||||
readonly singleTSConfigPath?: string;
|
readonly singleTSConfigPath?: string;
|
||||||
readonly populateGitInfo: boolean;
|
readonly populateGitInfo: boolean;
|
||||||
|
readonly skipAfterAnyFailure: boolean;
|
||||||
cliArgs: string[] = [];
|
cliArgs: string[] = [];
|
||||||
cliGrep: string | undefined;
|
cliGrep: string | undefined;
|
||||||
cliGrepInvert: string | undefined;
|
cliGrepInvert: string | undefined;
|
||||||
|
|
@ -87,6 +88,8 @@ export class FullConfigInternal {
|
||||||
// so that plugins such as gitCommitInfoPlugin can populate metadata once.
|
// so that plugins such as gitCommitInfoPlugin can populate metadata once.
|
||||||
userConfig.metadata = userConfig.metadata || {};
|
userConfig.metadata = userConfig.metadata || {};
|
||||||
|
|
||||||
|
this.skipAfterAnyFailure = userConfig.skipAfterAnyFailure ?? true;
|
||||||
|
|
||||||
this.config = {
|
this.config = {
|
||||||
configFile: resolvedConfigFile,
|
configFile: resolvedConfigFile,
|
||||||
rootDir: pathResolve(configDir, userConfig.testDir) || configDir,
|
rootDir: pathResolve(configDir, userConfig.testDir) || configDir,
|
||||||
|
|
@ -105,7 +108,6 @@ export class FullConfigInternal {
|
||||||
quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false),
|
quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false),
|
||||||
projects: [],
|
projects: [],
|
||||||
shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),
|
shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),
|
||||||
skipAfterAnyFailure: userConfig.skipAfterAnyFailure ?? true,
|
|
||||||
updateSnapshots: takeFirst(configCLIOverrides.updateSnapshots, userConfig.updateSnapshots, 'missing'),
|
updateSnapshots: takeFirst(configCLIOverrides.updateSnapshots, userConfig.updateSnapshots, 'missing'),
|
||||||
updateSourceMethod: takeFirst(configCLIOverrides.updateSourceMethod, userConfig.updateSourceMethod, 'patch'),
|
updateSourceMethod: takeFirst(configCLIOverrides.updateSourceMethod, userConfig.updateSourceMethod, 'patch'),
|
||||||
version: require('../../package.json').version,
|
version: require('../../package.json').version,
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ export class WorkerMain extends ProcessRunner {
|
||||||
const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout);
|
const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout);
|
||||||
const afterHooksSlot = { timeout: afterHooksTimeout, elapsed: 0 };
|
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 () => {
|
await testInfo._runAsStage({ title: 'After Hooks', stepInfo: { category: 'hook' } }, async () => {
|
||||||
let firstAfterHooksError: Error | undefined;
|
let firstAfterHooksError: Error | undefined;
|
||||||
|
|
|
||||||
2
packages/playwright/types/test.d.ts
vendored
2
packages/playwright/types/test.d.ts
vendored
|
|
@ -1949,8 +1949,6 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
current: number;
|
current: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
skipAfterAnyFailure: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue