From 82fb68fdde9a234e4f46ca6e349a77da9c5aec0c Mon Sep 17 00:00:00 2001 From: sand4rt Date: Wed, 13 Jul 2022 17:41:20 +0200 Subject: [PATCH] feat(ct): mount generic type required when specified (#15591) --- packages/playwright-ct-svelte/index.d.ts | 12 +++++++++--- packages/playwright-ct-vue/index.d.ts | 10 ++++++++-- packages/playwright-ct-vue2/index.d.ts | 10 ++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.ts index 34251168ed..83ddbe129c 100644 --- a/packages/playwright-ct-svelte/index.d.ts +++ b/packages/playwright-ct-svelte/index.d.ts @@ -34,9 +34,15 @@ export type PlaywrightTestConfig = Omit & { } }; -export interface ComponentFixtures { - mount(component: any, options?: { - props?: Props, +interface ComponentFixtures { + mount(component: any, options?: { + props?: { [key: string]: any }, + slots?: { [key: string]: any }, + on?: { [key: string]: Function }, + hooksConfig: any, + }): Promise; + mount(component: any, options: { + props: Props, slots?: { [key: string]: any }, on?: { [key: string]: Function }, hooksConfig: any, diff --git a/packages/playwright-ct-vue/index.d.ts b/packages/playwright-ct-vue/index.d.ts index 0ba8a57f72..f5f4d4906d 100644 --- a/packages/playwright-ct-vue/index.d.ts +++ b/packages/playwright-ct-vue/index.d.ts @@ -36,8 +36,14 @@ export type PlaywrightTestConfig = Omit & { export interface ComponentFixtures { mount(component: JSX.Element): Promise; - mount(component: any, options?: { - props?: Props, + mount(component: any, options?: { + props?: { [key: string]: any }, + slots?: { [key: string]: any }, + on?: { [key: string]: Function }, + hooksConfig?: any, + }): Promise; + mount(component: any, options: { + props: Props, slots?: { [key: string]: any }, on?: { [key: string]: Function }, hooksConfig?: any, diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.ts index 4e27f16d39..9e78cb0d99 100644 --- a/packages/playwright-ct-vue2/index.d.ts +++ b/packages/playwright-ct-vue2/index.d.ts @@ -36,8 +36,14 @@ export type PlaywrightTestConfig = Omit & { export interface ComponentFixtures { mount(component: JSX.Element): Promise; - mount(component: any, options?: { - props?: Props, + mount(component: any, options?: { + props?: { [key: string]: any }, + slots?: { [key: string]: any }, + on?: { [key: string]: Function }, + hooksConfig: any, + }): Promise; + mount(component: any, options: { + props: Props, slots?: { [key: string]: any }, on?: { [key: string]: Function }, hooksConfig: any,