2022-07-12 18:37:33 +02:00
|
|
|
import { beforeMount, afterMount } from '@playwright/experimental-ct-vue2/hooks';
|
2022-12-20 00:33:50 +01:00
|
|
|
import Router from 'vue-router';
|
|
|
|
|
import { router } from '../src/router';
|
|
|
|
|
import '../src/assets/index.css';
|
2022-07-12 18:37:33 +02:00
|
|
|
|
2023-01-12 19:46:15 +01:00
|
|
|
beforeMount(async ({ Vue, hooksConfig }) => {
|
2022-07-12 18:37:33 +02:00
|
|
|
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
|
2022-12-27 23:26:17 +01:00
|
|
|
|
|
|
|
|
if (hooksConfig?.routing) {
|
2023-01-12 19:46:15 +01:00
|
|
|
Vue.use(Router);
|
2022-12-27 23:26:17 +01:00
|
|
|
return { router }
|
|
|
|
|
}
|
2022-07-12 18:37:33 +02:00
|
|
|
});
|
|
|
|
|
|
2023-01-12 19:46:15 +01:00
|
|
|
afterMount(async ({ instance }) => {
|
2022-07-12 18:37:33 +02:00
|
|
|
console.log(`After mount el: ${instance.$el.constructor.name}`);
|
|
|
|
|
});
|