type fixes (#2)
This commit is contained in:
parent
0b5b2be88a
commit
1aebad3ffe
|
|
@ -109,6 +109,10 @@ Base directory for all relative paths used in the reporters.
|
|||
- type: <[null]|[Object]>
|
||||
- `total` <[int]> The total number of shards.
|
||||
- `current` <[int]> The index of the shard to execute, one-based.
|
||||
|
||||
## property: FullConfig.skipAfterAnyFailure
|
||||
* since: v1.51
|
||||
- type: <[boolean]>
|
||||
|
||||
See [`property: TestConfig.shard`].
|
||||
|
||||
|
|
|
|||
|
|
@ -506,6 +506,9 @@ export default defineConfig({
|
|||
});
|
||||
```
|
||||
|
||||
## property: TestConfig.skipAfterAnyFailure?
|
||||
* since: v1.51
|
||||
- type: <[boolean]>
|
||||
|
||||
## property: TestConfig.testDir
|
||||
* since: v1.10
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ export class FullConfigInternal {
|
|||
readonly projects: FullProjectInternal[] = [];
|
||||
readonly singleTSConfigPath?: string;
|
||||
readonly populateGitInfo: boolean;
|
||||
readonly skipAfterAnyFailure: boolean;
|
||||
cliArgs: string[] = [];
|
||||
cliGrep: string | undefined;
|
||||
cliGrepInvert: string | undefined;
|
||||
|
|
@ -88,8 +87,6 @@ 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,
|
||||
|
|
@ -108,6 +105,7 @@ 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,
|
||||
|
|
|
|||
|
|
@ -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.skipAfterAnyFailure;
|
||||
const FAILURE_AND_SkIP_NOW = testInfo._isFailure() && this._config.config.skipAfterAnyFailure;
|
||||
|
||||
await testInfo._runAsStage({ title: 'After Hooks', stepInfo: { category: 'hook' } }, async () => {
|
||||
let firstAfterHooksError: Error | undefined;
|
||||
|
|
|
|||
2
packages/playwright/types/test.d.ts
vendored
2
packages/playwright/types/test.d.ts
vendored
|
|
@ -1949,6 +1949,8 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
|||
current: number;
|
||||
};
|
||||
|
||||
skipAfterAnyFailure: boolean;
|
||||
|
||||
/**
|
||||
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue