Blame Raw
· · · 22 lines (796 B)
0 contributors
1export const testSetup = {
2 /**
3 * Navigates to the home page without waiting for SillyTavern to load.
4 * @param {Object} params
5 * @param {import('@playwright/test').Page} params.page
6 */
7 goST: async ({ page }) => {
8 await page.goto('/');
9 },
10
11 /**
12 * Waits for SillyTavern to fully load by navigating to the home page and waiting for the preloader to disappear.
13 * @param {Object} params
14 * @param {import('@playwright/test').Page} params.page
15 */
16 awaitST: async ({ page }) => {
17 await page.goto('/');
18 await page.click('#userList .userSelect:last-child');
19 await page.waitForURL('http://127.0.0.1:8000');
20 await page.waitForFunction('document.getElementById("preloader") === null', { timeout: 0 });
21 },
22};