mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
18 lines
490 B
JavaScript
18 lines
490 B
JavaScript
import { beforeMount, afterMount } from '@playwright/experimental-ct-vue2/hooks';
|
|
import Router from 'vue-router';
|
|
import { router } from '../src/router';
|
|
import '../src/assets/index.css';
|
|
|
|
beforeMount(async ({ Vue, hooksConfig }) => {
|
|
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
|
|
|
|
if (hooksConfig?.routing) {
|
|
Vue.use(Router);
|
|
return { router }
|
|
}
|
|
});
|
|
|
|
afterMount(async ({ instance }) => {
|
|
console.log(`After mount el: ${instance.$el.constructor.name}`);
|
|
});
|