Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(ct): vue revert json object as prop (#22005)
Sanderbfea952eefc6
diff --git a/packages/playwright-ct-vue/index.d.ts b/packages/playwright-ct-vue/index.d.tsindex f9a937719f..e3cd55a7f1 100644--- a/packages/playwright-ct-vue/index.d.ts+++ b/packages/playwright-ct-vue/index.d.ts@@ -41,14 +41,17 @@ type JsonObject = { [Key in string]?: JsonValue };type Slot = string | string[];-export interface MountOptions<HooksConfig extends JsonObject, Props extends JsonObject> {+export interface MountOptions<+ HooksConfig extends JsonObject,+ Props extends Record<string, unknown>+> {props?: Props;slots?: Record<string, Slot> & { default?: Slot };on?: Record<string, Function>;hooksConfig?: HooksConfig;}-interface MountResult<Props extends JsonObject> extends Locator {+interface MountResult<Props extends Record<string, unknown>> extends Locator {unmount(): Promise<void>;update(options: Omit<MountOptions<never, Props>, 'hooksConfig'>): Promise<void>;}@@ -62,9 +65,12 @@ export interface ComponentFixtures {mount(component: JSX.Element): Promise<MountResultJsx>;mount<HooksConfig extends JsonObject>(component: any,- options?: MountOptions<HooksConfig, JsonObject>- ): Promise<MountResult<JsonObject>>;- mount<HooksConfig extends JsonObject, Props extends JsonObject = JsonObject>(+ options?: MountOptions<HooksConfig, Record<string, unknown>>+ ): Promise<MountResult<Record<string, unknown>>>;+ mount<+ HooksConfig extends JsonObject,+ Props extends Record<string, unknown> = Record<string, unknown>+ >(component: any,options: MountOptions<HooksConfig, never> & { props: Props }): Promise<MountResult<Props>>;diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.tsindex f9a937719f..5f338cef3b 100644--- a/packages/playwright-ct-vue2/index.d.ts+++ b/packages/playwright-ct-vue2/index.d.ts@@ -41,14 +41,17 @@ type JsonObject = { [Key in string]?: JsonValue };type Slot = string | string[];-export interface MountOptions<HooksConfig extends JsonObject, Props extends JsonObject> {+export interface MountOptions<+ HooksConfig extends JsonObject,+ Props extends Record<string, unknown>+> {props?: Props;slots?: Record<string, Slot> & { default?: Slot };on?: Record<string, Function>;hooksConfig?: HooksConfig;}-interface MountResult<Props extends JsonObject> extends Locator {+interface MountResult<Props extends Record<string, unknown>> extends Locator {unmount(): Promise<void>;update(options: Omit<MountOptions<never, Props>, 'hooksConfig'>): Promise<void>;}@@ -62,9 +65,12 @@ export interface ComponentFixtures {mount(component: JSX.Element): Promise<MountResultJsx>;mount<HooksConfig extends JsonObject>(component: any,- options?: MountOptions<HooksConfig, JsonObject>- ): Promise<MountResult<JsonObject>>;- mount<HooksConfig extends JsonObject, Props extends JsonObject = JsonObject>(+ options?: MountOptions<HooksConfig, Record<string, unknown>>+ ): Promise<MountResult<Record<string, unknown>>>;+ mount<+ HooksConfig extends JsonObject,+ Props extends Record<string, unknown> = Record<string, unknown>+ >(component: any,options: MountOptions<HooksConfig, never> & { props: Props }): Promise<MountResult<Props>>;