fix(test-runner): mark attach as async (#13687)
Also brings back generation of experimental types as part of lint.
This commit is contained in:
parent
c7212e6d56
commit
3eac9c694c
|
|
@ -98,7 +98,7 @@ The list of files or buffers attached to the overall test run. Some reporters sh
|
|||
|
||||
To add an attachment, use [`method: GlobalInfo.attach`]. See [`property: TestInfo.attachments`] if you are looking for test-scoped attachments.
|
||||
|
||||
## method: GlobalInfo.attach
|
||||
## async method: GlobalInfo.attach
|
||||
|
||||
Attach a value or a file from disk to the overall test run. Some reporters show global attachments. Either [`option: path`] or [`option: body`] must be specified, but not both.
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ The list of files or buffers attached to the current test. Some reporters show t
|
|||
|
||||
To add an attachment, use [`method: TestInfo.attach`] instead of directly pushing onto this array.
|
||||
|
||||
## method: TestInfo.attach
|
||||
## async method: TestInfo.attach
|
||||
|
||||
Attach a value or a file from disk to the current test. Some reporters show test attachments. Either [`option: path`] or [`option: body`] must be specified, but not both.
|
||||
|
||||
|
|
|
|||
2
packages/playwright-test/types/test.d.ts
vendored
2
packages/playwright-test/types/test.d.ts
vendored
|
|
@ -1474,7 +1474,7 @@ export interface TestInfo {
|
|||
contentType?: string;
|
||||
|
||||
path?: string;
|
||||
}): void;
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Column number where the currently running test is declared.
|
||||
|
|
|
|||
11
tests/config/experimental.d.ts
vendored
11
tests/config/experimental.d.ts
vendored
|
|
@ -11117,13 +11117,18 @@ export interface Android {
|
|||
* @param options
|
||||
*/
|
||||
devices(options?: {
|
||||
/**
|
||||
* Optional host to establish ADB server connection. Default to `127.0.0.1`.
|
||||
*/
|
||||
host?: string;
|
||||
|
||||
/**
|
||||
* Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
|
||||
*/
|
||||
omitDriverInstall?: boolean;
|
||||
|
||||
/**
|
||||
* Optional port to establish ADB server connection.
|
||||
* Optional port to establish ADB server connection. Default to `5037`.
|
||||
*/
|
||||
port?: number;
|
||||
}): Promise<Array<AndroidDevice>>;
|
||||
|
|
@ -17143,7 +17148,7 @@ interface TestConfig {
|
|||
reuseExistingServer?: boolean;
|
||||
|
||||
/**
|
||||
* Current working directory of the spawned process, `process.cwd()` by default.
|
||||
* Current working directory of the spawned process, defaults to the directory of the configuration file.
|
||||
*/
|
||||
cwd?: string;
|
||||
|
||||
|
|
@ -17687,7 +17692,7 @@ export interface TestInfo {
|
|||
contentType?: string;
|
||||
|
||||
path?: string;
|
||||
}): void;
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Column number where the currently running test is declared.
|
||||
|
|
|
|||
|
|
@ -658,6 +658,7 @@ class TypesGenerator {
|
|||
writeFile(path.join(coreTypesDir, 'types.d.ts'), await generateCoreTypes(false), true);
|
||||
writeFile(path.join(testTypesDir, 'test.d.ts'), await generateTestTypes(false), true);
|
||||
writeFile(path.join(testTypesDir, 'testReporter.d.ts'), await generateReporterTypes(false), true);
|
||||
writeFile(path.join(__dirname, '..', '..', 'tests', 'config', 'experimental.d.ts'), await generateExperimentalTypes(), true);
|
||||
process.exit(hadChanges && process.argv.includes('--check-clean') ? 1 : 0);
|
||||
})().catch(e => {
|
||||
console.error(e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue