playwright/tests/components/ct-vue-cli/playwright/index.ts

16 lines
439 B
TypeScript
Raw Normal View History

2022-08-23 20:35:43 +02:00
//@ts-check
import '../src/assets/index.css';
2022-08-23 20:35:43 +02:00
import { beforeMount, afterMount } from '@playwright/experimental-ct-vue/hooks';
2022-10-18 22:04:54 +02:00
export type HooksConfig = {
route: string;
}
beforeMount<HooksConfig>(async ({ app, hooksConfig }) => {
2022-08-23 20:35:43 +02:00
console.log(`Before mount: ${JSON.stringify(hooksConfig)}, app: ${!!app}`);
});
2022-10-18 22:04:54 +02:00
afterMount<HooksConfig>(async ({ instance }) => {
2022-08-23 20:35:43 +02:00
console.log(`After mount el: ${instance.$el.constructor.name}`);
});