UNPKG

@ngx-playwright/test

Version:
25 lines 2.61 kB
/** * @template {import('@ngx-playwright/harness').AnyComponentHarness} C * @template {import('./args.js').NgxPlaywrightTestArgs & import('./args.js').NgxPlaywrightTestOptions & import('@playwright/test').PlaywrightTestArgs & import('@playwright/test').PlaywrightTestOptions} T * @template {import('./args.js').NgxPlaywrightTestWorkerArgs & import('@playwright/test').PlaywrightWorkerArgs & import('@playwright/test').PlaywrightWorkerOptions} W * @param {import('./types.js').PlaywrightScreen<C>} Screen * @param {import('@playwright/test').TestType<T, W>} test * @returns {import('@playwright/test').TestType<import('./args.js').NgxPlaywrightScreenTestArgs<C> & T, W>} */ export function mixinScreenFixtures<C extends import("@ngx-playwright/harness").AnyComponentHarness, T extends import("./args.js").NgxPlaywrightTestArgs & import("./args.js").NgxPlaywrightTestOptions & import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions, W extends import("./args.js").NgxPlaywrightTestWorkerArgs & import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>(Screen: import("./types.js").PlaywrightScreen<C>, test: import("@playwright/test").TestType<T, W>): import("@playwright/test").TestType<import("./args.js").NgxPlaywrightScreenTestArgs<C> & T, W>; /** * Creates a `test` function * * Tests defined using the returned function have access to two extra fixtures: * * - `screen` is the instance of Screen * - `$` is a special fixture that has to be destructured in the parameter, which will make those * destructured properties available. Accessing extra properties later on or using rest properties * is not supported and will yield undefined values. * * @template {import("@ngx-playwright/harness").AnyComponentHarness} C * @param {import('./types.js').PlaywrightScreen<C>} Screen The screen class to run the test in * @returns A test function to use for tests in the given screen */ export function createTest<C extends import("@ngx-playwright/harness").AnyComponentHarness>(Screen: import("./types.js").PlaywrightScreen<C>): import("@playwright/test").TestType<import("./args.js").NgxPlaywrightScreenTestArgs<C> & import("./args.js").NgxPlaywrightTestArgs & import("./args.js").NgxPlaywrightTestOptions & import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions, import("./args.js").NgxPlaywrightTestWorkerArgs & import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>; //# sourceMappingURL=../src/factory.d.ts.map