chore: widen Metadata type (#13942)

This commit is contained in:
Ross Wollman 2022-05-04 13:16:11 -07:00 committed by GitHub
parent cf5101d44a
commit 95f7acf1e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 20 deletions

View File

@ -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]>

View File

@ -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.

View File

@ -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[],

View File

@ -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[],

View File

@ -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.

View File

@ -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[],