export type ShardingMode
This commit is contained in:
parent
0503672cfb
commit
4b3d75467a
|
|
@ -484,7 +484,7 @@ export default defineConfig({
|
||||||
|
|
||||||
## property: TestConfig.shardingMode
|
## property: TestConfig.shardingMode
|
||||||
|
|
||||||
* since: v1.46
|
* since: v1.48
|
||||||
- type: ?<[ShardingMode]<"partition"|"round-robin"|"duration-round-robin">>
|
- type: ?<[ShardingMode]<"partition"|"round-robin"|"duration-round-robin">>
|
||||||
|
|
||||||
Defines the algorithm to be used for sharding. Defaults to `'partition'`.
|
Defines the algorithm to be used for sharding. Defaults to `'partition'`.
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import type { Config, Fixtures, PlaywrightTestConfig, Project, ReporterDescription } from '../../types/test';
|
import type { Config, Fixtures, ShardingMode, Project, ReporterDescription } from '../../types/test';
|
||||||
import type { Location } from '../../types/testReporter';
|
import type { Location } from '../../types/testReporter';
|
||||||
import type { TestRunnerPluginRegistration } from '../plugins';
|
import type { TestRunnerPluginRegistration } from '../plugins';
|
||||||
import { getPackageJsonPath, mergeObjects } from '../util';
|
import { getPackageJsonPath, mergeObjects } from '../util';
|
||||||
|
|
@ -56,7 +56,7 @@ export class FullConfigInternal {
|
||||||
cliFailOnFlakyTests?: boolean;
|
cliFailOnFlakyTests?: boolean;
|
||||||
testIdMatcher?: Matcher;
|
testIdMatcher?: Matcher;
|
||||||
defineConfigWasUsed = false;
|
defineConfigWasUsed = false;
|
||||||
shardingMode: Exclude<PlaywrightTestConfig['shardingMode'], undefined>;
|
shardingMode: ShardingMode;
|
||||||
lastRunFile: string | undefined;
|
lastRunFile: string | undefined;
|
||||||
lastRunInfo?: LastRunInfo;
|
lastRunInfo?: LastRunInfo;
|
||||||
|
|
||||||
|
|
|
||||||
5
packages/playwright/types/test.d.ts
vendored
5
packages/playwright/types/test.d.ts
vendored
|
|
@ -1439,7 +1439,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
*
|
*
|
||||||
* Learn more about [sharding](https://playwright.dev/docs/test-sharding) with Playwright Test.
|
* Learn more about [sharding](https://playwright.dev/docs/test-sharding) with Playwright Test.
|
||||||
*/
|
*/
|
||||||
shardingMode?: ShardingMode;
|
shardingMode?: "partition"|"round-robin"|"duration-round-robin";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* **NOTE** Use
|
* **NOTE** Use
|
||||||
|
|
@ -5118,8 +5118,7 @@ export interface PlaywrightWorkerOptions {
|
||||||
video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize };
|
video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize };
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ShardingMode = "partition" | "round-robin" | "duration-round-robin";
|
export type ShardingMode = Exclude<PlaywrightTestConfig['shardingMode'], undefined>;
|
||||||
|
|
||||||
export type ScreenshotMode = 'off' | 'on' | 'only-on-failure';
|
export type ScreenshotMode = 'off' | 'on' | 'only-on-failure';
|
||||||
export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure';
|
export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure';
|
||||||
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
|
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
|
||||||
|
|
|
||||||
1
utils/generate_types/overrides-test.d.ts
vendored
1
utils/generate_types/overrides-test.d.ts
vendored
|
|
@ -202,6 +202,7 @@ export interface PlaywrightWorkerOptions {
|
||||||
video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize };
|
video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ShardingMode = Exclude<PlaywrightTestConfig['shardingMode'], undefined>;
|
||||||
export type ScreenshotMode = 'off' | 'on' | 'only-on-failure';
|
export type ScreenshotMode = 'off' | 'on' | 'only-on-failure';
|
||||||
export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure';
|
export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | 'on-all-retries' | 'retain-on-first-failure';
|
||||||
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
|
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue