From 6a9e60d6a17b2a5b88c2bfa6826a9cec5b37fe0a Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 16 Jul 2024 19:32:51 +0200 Subject: [PATCH] fix(ct): import ct* flavour types from ct-core and then from pwt (#31642) --- packages/playwright-ct-core/index.d.ts | 2 +- packages/playwright-ct-react/index.d.ts | 6 ++---- packages/playwright-ct-react17/index.d.ts | 6 ++---- packages/playwright-ct-solid/index.d.ts | 6 ++---- packages/playwright-ct-svelte/index.d.ts | 6 ++---- packages/playwright-ct-vue/index.d.ts | 6 ++---- packages/playwright-ct-vue2/index.d.ts | 6 ++---- 7 files changed, 13 insertions(+), 25 deletions(-) diff --git a/packages/playwright-ct-core/index.d.ts b/packages/playwright-ct-core/index.d.ts index b397169b74..1006bd59ec 100644 --- a/packages/playwright-ct-core/index.d.ts +++ b/packages/playwright-ct-core/index.d.ts @@ -56,4 +56,4 @@ export function defineConfig(config: PlaywrightTestConfig, ...configs: Playwrigh export function defineConfig(config: PlaywrightTestConfig, ...configs: PlaywrightTestConfig[]): PlaywrightTestConfig; export function defineConfig(config: PlaywrightTestConfig, ...configs: PlaywrightTestConfig[]): PlaywrightTestConfig; -export { expect, devices } from 'playwright/test'; +export { expect, devices, Locator } from 'playwright/test'; diff --git a/packages/playwright-ct-react/index.d.ts b/packages/playwright-ct-react/index.d.ts index c086d4bec5..c5e6d6d2da 100644 --- a/packages/playwright-ct-react/index.d.ts +++ b/packages/playwright-ct-react/index.d.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator } from '@playwright/experimental-ct-core'; export interface MountOptions { hooksConfig?: HooksConfig; @@ -33,5 +32,4 @@ export const test: TestType<{ ): Promise; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core'; diff --git a/packages/playwright-ct-react17/index.d.ts b/packages/playwright-ct-react17/index.d.ts index c086d4bec5..748212c45e 100644 --- a/packages/playwright-ct-react17/index.d.ts +++ b/packages/playwright-ct-react17/index.d.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator} from '@playwright/experimental-ct-core'; export interface MountOptions { hooksConfig?: HooksConfig; @@ -33,5 +32,4 @@ export const test: TestType<{ ): Promise; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core'; diff --git a/packages/playwright-ct-solid/index.d.ts b/packages/playwright-ct-solid/index.d.ts index c086d4bec5..c5e6d6d2da 100644 --- a/packages/playwright-ct-solid/index.d.ts +++ b/packages/playwright-ct-solid/index.d.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator } from '@playwright/experimental-ct-core'; export interface MountOptions { hooksConfig?: HooksConfig; @@ -33,5 +32,4 @@ export const test: TestType<{ ): Promise; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core'; diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.ts index eb6d464032..761831f331 100644 --- a/packages/playwright-ct-svelte/index.d.ts +++ b/packages/playwright-ct-svelte/index.d.ts @@ -14,9 +14,8 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; import type { SvelteComponent, ComponentProps } from 'svelte/types/runtime'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator } from '@playwright/experimental-ct-core'; type ComponentSlot = string | string[]; type ComponentSlots = Record & { default?: ComponentSlot }; @@ -44,5 +43,4 @@ export const test: TestType<{ ): Promise>; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core'; diff --git a/packages/playwright-ct-vue/index.d.ts b/packages/playwright-ct-vue/index.d.ts index fee68f3cd0..2d182d4588 100644 --- a/packages/playwright-ct-vue/index.d.ts +++ b/packages/playwright-ct-vue/index.d.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator } from '@playwright/experimental-ct-core'; type ComponentSlot = string | string[]; type ComponentSlots = Record & { default?: ComponentSlot }; @@ -64,5 +63,4 @@ export const test: TestType<{ ): Promise>; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core'; diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.ts index f1a2a0489f..133b4a60f2 100644 --- a/packages/playwright-ct-vue2/index.d.ts +++ b/packages/playwright-ct-vue2/index.d.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import type { Locator } from 'playwright/test'; -import type { TestType } from '@playwright/experimental-ct-core'; +import type { TestType, Locator } from '@playwright/experimental-ct-core'; type Slot = string | string[]; type ComponentSlots = Record & { default?: Slot }; @@ -64,5 +63,4 @@ export const test: TestType<{ ): Promise>; }>; -export { defineConfig, PlaywrightTestConfig } from '@playwright/experimental-ct-core'; -export { expect, devices } from 'playwright/test'; +export { defineConfig, PlaywrightTestConfig, expect, devices } from '@playwright/experimental-ct-core';