@playwright/experimental-ct-vue 1.32.1 → 1.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +11 -5
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -41,14 +41,17 @@ type JsonObject = { [Key in string]?: JsonValue };
41
41
 
42
42
  type Slot = string | string[];
43
43
 
44
- export interface MountOptions<HooksConfig extends JsonObject, Props extends JsonObject> {
44
+ export interface MountOptions<
45
+ HooksConfig extends JsonObject,
46
+ Props extends Record<string, unknown>
47
+ > {
45
48
  props?: Props;
46
49
  slots?: Record<string, Slot> & { default?: Slot };
47
50
  on?: Record<string, Function>;
48
51
  hooksConfig?: HooksConfig;
49
52
  }
50
53
 
51
- interface MountResult<Props extends JsonObject> extends Locator {
54
+ interface MountResult<Props extends Record<string, unknown>> extends Locator {
52
55
  unmount(): Promise<void>;
53
56
  update(options: Omit<MountOptions<never, Props>, 'hooksConfig'>): Promise<void>;
54
57
  }
@@ -62,9 +65,12 @@ export interface ComponentFixtures {
62
65
  mount(component: JSX.Element): Promise<MountResultJsx>;
63
66
  mount<HooksConfig extends JsonObject>(
64
67
  component: any,
65
- options?: MountOptions<HooksConfig, JsonObject>
66
- ): Promise<MountResult<JsonObject>>;
67
- mount<HooksConfig extends JsonObject, Props extends JsonObject = JsonObject>(
68
+ options?: MountOptions<HooksConfig, Record<string, unknown>>
69
+ ): Promise<MountResult<Record<string, unknown>>>;
70
+ mount<
71
+ HooksConfig extends JsonObject,
72
+ Props extends Record<string, unknown> = Record<string, unknown>
73
+ >(
68
74
  component: any,
69
75
  options: MountOptions<HooksConfig, never> & { props: Props }
70
76
  ): Promise<MountResult<Props>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playwright/experimental-ct-vue",
3
- "version": "1.32.1",
3
+ "version": "1.32.2",
4
4
  "description": "Playwright Component Testing for Vue",
5
5
  "repository": "github:Microsoft/playwright",
6
6
  "homepage": "https://playwright.dev",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@vitejs/plugin-vue": "^4.0.0",
30
- "@playwright/test": "1.32.1",
30
+ "@playwright/test": "1.32.2",
31
31
  "vite": "^4.1.1"
32
32
  },
33
33
  "bin": {