mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: widen Metadata type (#13942)
This commit is contained in:
parent
cf5101d44a
commit
95f7acf1e4
@ -147,9 +147,9 @@ Filter to only run tests with a title **not** matching one of the patterns. This
|
|||||||
`grepInvert` option is also useful for [tagging tests](../test-annotations.md#tag-tests).
|
`grepInvert` option is also useful for [tagging tests](../test-annotations.md#tag-tests).
|
||||||
|
|
||||||
## property: TestProject.metadata
|
## property: TestProject.metadata
|
||||||
- type: ?<[any]>
|
- type: ?<[Metadata]>
|
||||||
|
|
||||||
Any JSON-serializable metadata that will be put directly to the test report.
|
Metadata that will be put directly to the test report serialized as JSON.
|
||||||
|
|
||||||
## property: TestProject.name
|
## property: TestProject.name
|
||||||
- type: ?<[string]>
|
- type: ?<[string]>
|
||||||
|
10
packages/playwright-test/types/test.d.ts
vendored
10
packages/playwright-test/types/test.d.ts
vendored
@ -195,9 +195,9 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
|||||||
*/
|
*/
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
grepInvert: RegExp | RegExp[] | null;
|
||||||
/**
|
/**
|
||||||
* Any JSON-serializable metadata that will be put directly to the test report.
|
* Metadata that will be put directly to the test report serialized as JSON.
|
||||||
*/
|
*/
|
||||||
metadata: any;
|
metadata: Metadata;
|
||||||
/**
|
/**
|
||||||
* Project name is visible in the report and during test execution.
|
* Project name is visible in the report and during test execution.
|
||||||
*/
|
*/
|
||||||
@ -919,7 +919,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
|
|||||||
use?: UseOptions<TestArgs, WorkerArgs>;
|
use?: UseOptions<TestArgs, WorkerArgs>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Metadata = { [key: string]: string | number | boolean };
|
export type Metadata = { [key: string]: any };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout` or
|
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout` or
|
||||||
@ -3648,9 +3648,9 @@ interface TestProject {
|
|||||||
grepInvert?: RegExp|Array<RegExp>;
|
grepInvert?: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Any JSON-serializable metadata that will be put directly to the test report.
|
* Metadata that will be put directly to the test report serialized as JSON.
|
||||||
*/
|
*/
|
||||||
metadata?: any;
|
metadata?: Metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project name is visible in the report and during test execution.
|
* Project name is visible in the report and during test execution.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FullConfig, FullProject, TestStatus, TestError } from '@playwright/test';
|
import type { FullConfig, FullProject, TestStatus, TestError, Metadata } from '@playwright/test';
|
||||||
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -437,7 +437,7 @@ export interface JSONReport {
|
|||||||
outputDir: string,
|
outputDir: string,
|
||||||
repeatEach: number,
|
repeatEach: number,
|
||||||
retries: number,
|
retries: number,
|
||||||
metadata: any,
|
metadata: Metadata,
|
||||||
name: string,
|
name: string,
|
||||||
testDir: string,
|
testDir: string,
|
||||||
testIgnore: string[],
|
testIgnore: string[],
|
||||||
|
14
tests/config/experimental.d.ts
vendored
14
tests/config/experimental.d.ts
vendored
@ -16855,9 +16855,9 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
|||||||
*/
|
*/
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
grepInvert: RegExp | RegExp[] | null;
|
||||||
/**
|
/**
|
||||||
* Any JSON-serializable metadata that will be put directly to the test report.
|
* Metadata that will be put directly to the test report serialized as JSON.
|
||||||
*/
|
*/
|
||||||
metadata: any;
|
metadata: Metadata;
|
||||||
/**
|
/**
|
||||||
* Project name is visible in the report and during test execution.
|
* Project name is visible in the report and during test execution.
|
||||||
*/
|
*/
|
||||||
@ -17664,7 +17664,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
|
|||||||
use?: UseOptions<TestArgs, WorkerArgs>;
|
use?: UseOptions<TestArgs, WorkerArgs>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Metadata = { [key: string]: string | number | boolean };
|
export type Metadata = { [key: string]: any };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout` or
|
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout` or
|
||||||
@ -20626,9 +20626,9 @@ interface TestProject {
|
|||||||
grepInvert?: RegExp|Array<RegExp>;
|
grepInvert?: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Any JSON-serializable metadata that will be put directly to the test report.
|
* Metadata that will be put directly to the test report serialized as JSON.
|
||||||
*/
|
*/
|
||||||
metadata?: any;
|
metadata?: Metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project name is visible in the report and during test execution.
|
* Project name is visible in the report and during test execution.
|
||||||
@ -20881,7 +20881,7 @@ declare module '@playwright/test/reporter' {
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FullConfig, FullProject, TestStatus, TestError } from '@playwright/test';
|
import type { FullConfig, FullProject, TestStatus, TestError, Metadata } from '@playwright/test';
|
||||||
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21303,7 +21303,7 @@ export interface JSONReport {
|
|||||||
outputDir: string,
|
outputDir: string,
|
||||||
repeatEach: number,
|
repeatEach: number,
|
||||||
retries: number,
|
retries: number,
|
||||||
metadata: any,
|
metadata: Metadata,
|
||||||
name: string,
|
name: string,
|
||||||
testDir: string,
|
testDir: string,
|
||||||
testIgnore: string[],
|
testIgnore: string[],
|
||||||
|
4
utils/generate_types/overrides-test.d.ts
vendored
4
utils/generate_types/overrides-test.d.ts
vendored
@ -40,7 +40,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
|
|||||||
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
||||||
grep: RegExp | RegExp[];
|
grep: RegExp | RegExp[];
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
grepInvert: RegExp | RegExp[] | null;
|
||||||
metadata: any;
|
metadata: Metadata;
|
||||||
name: string;
|
name: string;
|
||||||
snapshotDir: string;
|
snapshotDir: string;
|
||||||
outputDir: string;
|
outputDir: string;
|
||||||
@ -66,7 +66,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
|
|||||||
use?: UseOptions<TestArgs, WorkerArgs>;
|
use?: UseOptions<TestArgs, WorkerArgs>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Metadata = { [key: string]: string | number | boolean };
|
export type Metadata = { [key: string]: any };
|
||||||
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!!
|
// [internal] !!! DO NOT ADD TO THIS !!!
|
||||||
// [internal] It is part of the public API and is computed from the user's config.
|
// [internal] It is part of the public API and is computed from the user's config.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FullConfig, FullProject, TestStatus, TestError } from '@playwright/test';
|
import type { FullConfig, FullProject, TestStatus, TestError, Metadata } from '@playwright/test';
|
||||||
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
export type { FullConfig, TestStatus, TestError } from '@playwright/test';
|
||||||
|
|
||||||
export interface Suite {
|
export interface Suite {
|
||||||
@ -54,7 +54,7 @@ export interface JSONReport {
|
|||||||
outputDir: string,
|
outputDir: string,
|
||||||
repeatEach: number,
|
repeatEach: number,
|
||||||
retries: number,
|
retries: number,
|
||||||
metadata: any,
|
metadata: Metadata,
|
||||||
name: string,
|
name: string,
|
||||||
testDir: string,
|
testDir: string,
|
||||||
testIgnore: string[],
|
testIgnore: string[],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user