chore: render plain class links in types (#23508)

This commit is contained in:
Max Schmitt 2023-06-05 18:50:44 +02:00 committed by GitHub
parent 75971af55b
commit 80fe9748eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 353 additions and 326 deletions

File diff suppressed because it is too large Load diff

View file

@ -37,8 +37,8 @@ type UseOptions<TestArgs, WorkerArgs> = { [K in keyof WorkerArgs]?: WorkerArgs[K
*
* `TestProject` encapsulates configuration specific to a single project. Projects are configured in
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects) specified in the
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of [TestProject] are available in the
* top-level [TestConfig], in which case they are shared between all projects.
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of {@link TestProject} are available in
* the top-level {@link TestConfig}, in which case they are shared between all projects.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
@ -85,7 +85,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
/**
* Options for all tests in this project, for example
* [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* ```js
* // playwright.config.ts
@ -115,8 +115,8 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
*
* `TestProject` encapsulates configuration specific to a single project. Projects are configured in
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects) specified in the
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of [TestProject] are available in the
* top-level [TestConfig], in which case they are shared between all projects.
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of {@link TestProject} are available in
* the top-level {@link TestConfig}, in which case they are shared between all projects.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
@ -418,7 +418,7 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
/**
* Options for all tests in this project, for example
* [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* ```js
* // playwright.config.ts
@ -446,12 +446,12 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
/**
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout`
* or `testDir`. These options are described in the [TestConfig] object in the
* or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* Playwright Test supports running multiple test projects at the same time. Project-specific options should be put to
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level
* [TestConfig] can also define base options shared between all projects.
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level {@link
* TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@ -965,7 +965,8 @@ interface TestConfig {
preserveOutput?: "always"|"never"|"failures-only";
/**
* Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
* Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
* information.
*
* **Usage**
*
@ -1355,12 +1356,12 @@ interface TestConfig {
/**
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout`
* or `testDir`. These options are described in the [TestConfig] object in the
* or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* Playwright Test supports running multiple test projects at the same time. Project-specific options should be put to
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level
* [TestConfig] can also define base options shared between all projects.
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level {@link
* TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@ -1377,7 +1378,8 @@ interface TestConfig {
*/
export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
/**
* Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
* Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
* information.
*
* **Usage**
*
@ -1397,7 +1399,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
/**
* Global options for all tests, for example
* [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
* about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* **Usage**
*
@ -1420,12 +1422,12 @@ export type Metadata = { [key: string]: any };
/**
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout`
* or `testDir`. These options are described in the [TestConfig] object in the
* or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* Playwright Test supports running multiple test projects at the same time. Project-specific options should be put to
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level
* [TestConfig] can also define base options shared between all projects.
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level {@link
* TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@ -1633,7 +1635,8 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
*/
preserveOutput: 'always' | 'never' | 'failures-only';
/**
* Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
* Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
* information.
*
* **Usage**
*
@ -1860,7 +1863,7 @@ export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interru
/**
* `WorkerInfo` contains information about the worker that is running tests and is available to worker-scoped
* fixtures. `WorkerInfo` is a subset of [TestInfo] that is available in many other places.
* fixtures. `WorkerInfo` is a subset of {@link TestInfo} that is available in many other places.
*/
export interface WorkerInfo {
/**
@ -2419,7 +2422,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
only: TestFunction<TestArgs & WorkerArgs>;
/**
@ -2689,7 +2692,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
skip(title: string, testFunction: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
@ -2794,7 +2797,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
* @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
fixme(title: string, testFunction: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
@ -3061,8 +3064,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* each test in the group. If multiple `beforeEach` hooks are added, they will run in the order of their
* registration.
*
* You can access all the same [Fixtures] as the test function itself, and also the [TestInfo] object that gives a lot
* of useful information. For example, you can navigate the page before starting the test.
* You can access all the same {@link Fixtures} as the test function itself, and also the {@link TestInfo} object that
* gives a lot of useful information. For example, you can navigate the page before starting the test.
*
* You can use [test.afterEach(hookFunction)](https://playwright.dev/docs/api/class-test#test-after-each) to teardown
* any resources set up in `beforeEach`.
@ -3083,7 +3086,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
beforeEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@ -3095,8 +3098,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) group, runs after each
* test in the group. If multiple `afterEach` hooks are added, they will run in the order of their registration.
*
* You can access all the same [Fixtures] as the test function itself, and also the [TestInfo] object that gives a lot
* of useful information. For example, you can check whether the test succeeded or failed.
* You can access all the same {@link Fixtures} as the test function itself, and also the {@link TestInfo} object that
* gives a lot of useful information. For example, you can check whether the test succeeded or failed.
*
* **Usage**
*
@ -3116,7 +3119,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
afterEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@ -3153,7 +3156,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
*/
beforeAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@ -3177,7 +3180,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
*/
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@ -3396,7 +3399,8 @@ type ConnectOptions = {
};
/**
* Playwright Test provides many options to configure test environment, [Browser], [BrowserContext] and more.
* Playwright Test provides many options to configure test environment, {@link Browser}, {@link BrowserContext} and
* more.
*
* These options are usually provided in the [configuration file](https://playwright.dev/docs/test-configuration) through
* [testConfig.use](https://playwright.dev/docs/api/class-testconfig#test-config-use) and
@ -3434,7 +3438,7 @@ type ConnectOptions = {
export interface PlaywrightWorkerOptions {
/**
* Name of the browser that runs tests. Defaults to `'chromium'`. Most of the time you should set `browserName` in
* your [TestConfig]:
* your {@link TestConfig}:
*
* **Usage**
*
@ -3633,7 +3637,8 @@ export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' |
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
/**
* Playwright Test provides many options to configure test environment, [Browser], [BrowserContext] and more.
* Playwright Test provides many options to configure test environment, {@link Browser}, {@link BrowserContext} and
* more.
*
* These options are usually provided in the [configuration file](https://playwright.dev/docs/test-configuration) through
* [testConfig.use](https://playwright.dev/docs/api/class-testconfig#test-config-use) and
@ -4181,10 +4186,10 @@ export interface PlaywrightTestOptions {
* ```
*
* Given the test above, Playwright Test will set up the `page` fixture before running the test, and tear it down
* after the test has finished. `page` fixture provides a [Page] object that is available to the test.
* after the test has finished. `page` fixture provides a {@link Page} object that is available to the test.
*
* Playwright Test comes with builtin fixtures listed below, and you can add your own fixtures as well. Playwright
* Test also [provides options][TestOptions] to configure
* Test also [provides options]{@link TestOptions} to configure
* [fixtures.browser](https://playwright.dev/docs/api/class-fixtures#fixtures-browser),
* [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) and
* [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page).
@ -4192,10 +4197,10 @@ export interface PlaywrightTestOptions {
export interface PlaywrightWorkerArgs {
playwright: typeof import('playwright-core');
/**
* [Browser] instance is shared between all tests in the [same worker](https://playwright.dev/docs/test-parallel) - this makes testing
* efficient. However, each test runs in an isolated [BrowserContext] and gets a fresh environment.
* {@link Browser} instance is shared between all tests in the [same worker](https://playwright.dev/docs/test-parallel) - this makes testing
* efficient. However, each test runs in an isolated {@link BrowserContext} and gets a fresh environment.
*
* Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
* Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* **Usage**
*
@ -4227,20 +4232,21 @@ export interface PlaywrightWorkerArgs {
* ```
*
* Given the test above, Playwright Test will set up the `page` fixture before running the test, and tear it down
* after the test has finished. `page` fixture provides a [Page] object that is available to the test.
* after the test has finished. `page` fixture provides a {@link Page} object that is available to the test.
*
* Playwright Test comes with builtin fixtures listed below, and you can add your own fixtures as well. Playwright
* Test also [provides options][TestOptions] to configure
* Test also [provides options]{@link TestOptions} to configure
* [fixtures.browser](https://playwright.dev/docs/api/class-fixtures#fixtures-browser),
* [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) and
* [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page).
*/
export interface PlaywrightTestArgs {
/**
* Isolated [BrowserContext] instance, created for each test. Since contexts are isolated between each other, every
* test gets a fresh environment, even when multiple tests run in a single [Browser] for maximum efficiency.
* Isolated {@link BrowserContext} instance, created for each test. Since contexts are isolated between each other,
* every test gets a fresh environment, even when multiple tests run in a single {@link Browser} for maximum
* efficiency.
*
* Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
* Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* Default [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page) belongs to this context.
*
@ -4256,7 +4262,7 @@ export interface PlaywrightTestArgs {
*/
context: BrowserContext;
/**
* Isolated [Page] instance, created for each test. Pages are isolated between tests due to
* Isolated {@link Page} instance, created for each test. Pages are isolated between tests due to
* [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) isolation.
*
* This is the most common fixture used in a test.
@ -4278,7 +4284,7 @@ export interface PlaywrightTestArgs {
*/
page: Page;
/**
* Isolated [APIRequestContext] instance for each test.
* Isolated {@link APIRequestContext} instance for each test.
*
* **Usage**
*
@ -4324,8 +4330,8 @@ type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
type ExtraMatchers<T, Type, Matchers> = T extends Type ? Matchers : IfAny<T, Matchers, {}>;
/**
* The [GenericAssertions] class provides assertion methods that can be used to make assertions about any values in
* the tests. A new instance of [GenericAssertions] is created by calling
* The {@link GenericAssertions} class provides assertion methods that can be used to make assertions about any values
* in the tests. A new instance of {@link GenericAssertions} is created by calling
* [expect(value)](https://playwright.dev/docs/api/class-playwrightassertions#playwright-assertions-expect-generic):
*
* ```js
@ -4824,8 +4830,8 @@ export {};
/**
* The [APIResponseAssertions] class provides assertion methods that can be used to make assertions about the
* [APIResponse] in the tests.
* The {@link APIResponseAssertions} class provides assertion methods that can be used to make assertions about the
* {@link APIResponse} in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@ -4864,8 +4870,8 @@ interface APIResponseAssertions {
}
/**
* The [LocatorAssertions] class provides assertion methods that can be used to make assertions about the [Locator]
* state in the tests.
* The {@link LocatorAssertions} class provides assertion methods that can be used to make assertions about the {@link
* Locator} state in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@ -4880,7 +4886,7 @@ interface APIResponseAssertions {
*/
interface LocatorAssertions {
/**
* Ensures that [Locator] points to an [attached](https://playwright.dev/docs/actionability#attached) DOM node.
* Ensures that {@link Locator} points to an [attached](https://playwright.dev/docs/actionability#attached) DOM node.
*
* **Usage**
*
@ -4900,7 +4906,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to a checked input.
* Ensures the {@link Locator} points to a checked input.
*
* **Usage**
*
@ -4921,7 +4927,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to a disabled element. Element is disabled if it has "disabled" attribute or is
* Ensures the {@link Locator} points to a disabled element. Element is disabled if it has "disabled" attribute or is
* disabled via
* ['aria-disabled'](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled). Note
* that only native control elements such as HTML `button`, `input`, `select`, `textarea`, `option`, `optgroup` can be
@ -4944,7 +4950,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an editable element.
* Ensures the {@link Locator} points to an editable element.
*
* **Usage**
*
@ -4965,7 +4971,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an empty editable element or to a DOM node that has no text.
* Ensures the {@link Locator} points to an empty editable element or to a DOM node that has no text.
*
* **Usage**
*
@ -4984,7 +4990,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an enabled element.
* Ensures the {@link Locator} points to an enabled element.
*
* **Usage**
*
@ -5005,7 +5011,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to a focused DOM node.
* Ensures the {@link Locator} points to a focused DOM node.
*
* **Usage**
*
@ -5024,7 +5030,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures that [Locator] either does not resolve to any DOM node, or resolves to a
* Ensures that {@link Locator} either does not resolve to any DOM node, or resolves to a
* [non-visible](https://playwright.dev/docs/actionability#visible) one.
*
* **Usage**
@ -5044,7 +5050,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element that intersects viewport, according to the
* Ensures the {@link Locator} points to an element that intersects viewport, according to the
* [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
*
* **Usage**
@ -5075,7 +5081,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures that [Locator] points to an [attached](https://playwright.dev/docs/actionability#attached) and
* Ensures that {@link Locator} points to an [attached](https://playwright.dev/docs/actionability#attached) and
* [visible](https://playwright.dev/docs/actionability#visible) DOM node.
*
* **Usage**
@ -5096,8 +5102,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element that contains the given text. You can use regular expressions for the
* value as well.
* Ensures the {@link Locator} points to an element that contains the given text. You can use regular expressions for
* the value as well.
*
* **Usage**
*
@ -5161,7 +5167,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with given attribute.
* Ensures the {@link Locator} points to an element with given attribute.
*
* **Usage**
*
@ -5182,8 +5188,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with given CSS classes. This needs to be a full match or using a relaxed
* regular expression.
* Ensures the {@link Locator} points to an element with given CSS classes. This needs to be a full match or using a
* relaxed regular expression.
*
* **Usage**
*
@ -5215,7 +5221,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] resolves to an exact number of DOM nodes.
* Ensures the {@link Locator} resolves to an exact number of DOM nodes.
*
* **Usage**
*
@ -5235,7 +5241,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] resolves to an element with the given computed CSS style.
* Ensures the {@link Locator} resolves to an element with the given computed CSS style.
*
* **Usage**
*
@ -5256,7 +5262,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with the given DOM Node ID.
* Ensures the {@link Locator} points to an element with the given DOM Node ID.
*
* **Usage**
*
@ -5276,8 +5282,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with given JavaScript property. Note that this property can be of a
* primitive type as well as a plain serializable JavaScript object.
* Ensures the {@link Locator} points to an element with given JavaScript property. Note that this property can be of
* a primitive type as well as a plain serializable JavaScript object.
*
* **Usage**
*
@ -5453,8 +5459,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with the given text. You can use regular expressions for the value as
* well.
* Ensures the {@link Locator} points to an element with the given text. You can use regular expressions for the value
* as well.
*
* **Usage**
*
@ -5517,8 +5523,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to an element with the given input value. You can use regular expressions for the
* value as well.
* Ensures the {@link Locator} points to an element with the given input value. You can use regular expressions for
* the value as well.
*
* **Usage**
*
@ -5538,7 +5544,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
* Ensures the {@link Locator} points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
* specified values are selected.
*
* **Usage**
@ -5582,8 +5588,8 @@ interface LocatorAssertions {
}
/**
* The [PageAssertions] class provides assertion methods that can be used to make assertions about the [Page] state in
* the tests.
* The {@link PageAssertions} class provides assertion methods that can be used to make assertions about the {@link
* Page} state in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@ -6001,8 +6007,8 @@ export interface TestInfoError {
*
* `TestProject` encapsulates configuration specific to a single project. Projects are configured in
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects) specified in the
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of [TestProject] are available in the
* top-level [TestConfig], in which case they are shared between all projects.
* [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of {@link TestProject} are available in
* the top-level {@link TestConfig}, in which case they are shared between all projects.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.

View file

@ -20,15 +20,15 @@ export type { FullConfig, TestStatus } from './test';
/**
* `Suite` is a group of tests. All tests in Playwright Test form the following hierarchy:
* - Root suite has a child suite for each [TestProject].
* - Root suite has a child suite for each {@link TestProject}.
* - Project suite #1. Has a child suite for each test file in the project.
* - File suite #1
* - [TestCase] #1
* - [TestCase] #2
* - {@link TestCase} #1
* - {@link TestCase} #2
* - Suite corresponding to a
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) group
* - [TestCase] #1 in a group
* - [TestCase] #2 in a group
* - {@link TestCase} #1 in a group
* - {@link TestCase} #2 in a group
* - < more test cases ... >
* - File suite #2
* - < more file suites ... >
@ -65,7 +65,7 @@ export interface Suite {
parent?: Suite;
/**
* Child suites. See [Suite] for the hierarchy of suites.
* Child suites. See {@link Suite} for the hierarchy of suites.
*/
suites: Array<Suite>;
@ -200,7 +200,7 @@ export interface TestCase {
}
/**
* A result of a single [TestCase] run.
* A result of a single {@link TestCase} run.
*/
export interface TestResult {
/**
@ -357,17 +357,18 @@ export interface FullResult {
*
* Here is a typical order of reporter calls:
* - [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) is called
* once with a root suite that contains all other suites and tests. Learn more about [suites hierarchy][Suite].
* once with a root suite that contains all other suites and tests. Learn more about [suites hierarchy]{@link
* Suite}.
* - [reporter.onTestBegin(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-begin) is
* called for each test run. It is given a [TestCase] that is executed, and a [TestResult] that is almost empty.
* Test result will be populated while the test runs (for example, with steps and stdio) and will get final
* `status` once the test finishes.
* called for each test run. It is given a {@link TestCase} that is executed, and a {@link TestResult} that is
* almost empty. Test result will be populated while the test runs (for example, with steps and stdio) and will
* get final `status` once the test finishes.
* - [reporter.onStepBegin(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-begin)
* and
* [reporter.onStepEnd(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-end)
* are called for each executed step inside the test. When steps are executed, test run has not finished yet.
* - [reporter.onTestEnd(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-end) is
* called when test run has finished. By this time, [TestResult] is complete and you can use
* called when test run has finished. By this time, {@link TestResult} is complete and you can use
* [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status),
* [testResult.error](https://playwright.dev/docs/api/class-testresult#test-result-error) and more.
* - [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) is called once after
@ -389,7 +390,8 @@ export interface FullResult {
*/
export interface Reporter {
/**
* Called once before running tests. All tests have been already discovered and put into a hierarchy of [Suite]s.
* Called once before running tests. All tests have been already discovered and put into a hierarchy of {@link
* Suite}s.
* @param config Resolved configuration.
* @param suite The root suite that contains all projects, files and test cases.
*/
@ -560,7 +562,7 @@ export {};
/**
* Represents a location in the source code where [TestCase] or [Suite] is defined.
* Represents a location in the source code where {@link TestCase} or {@link Suite} is defined.
*/
export interface Location {
/**

View file

@ -77,7 +77,7 @@ class TypesGenerator {
if (option)
return `\`${option}\``;
if (clazz)
return `[${clazz.name}]`;
return `{@link ${clazz.name}}`;
if (!member || !member.clazz)
throw new Error('Internal error');
const className = member.clazz.varName === 'playwrightAssertions' ? '' : member.clazz.varName + '.';