chore: test fix

This commit is contained in:
Bijin A B
2026-05-08 14:15:16 +05:30
parent 3aa85507ad
commit 7a4ec5f090
18 changed files with 165 additions and 181 deletions

View File

@@ -1,7 +1,7 @@
import * as path from 'path';
import { pathToFileURL } from 'url';
import { test } from '../../../playwright';
import { setSandboxMode, runCollection, validateRunnerResults } from '../../utils/page';
import { setSandboxMode, runCollection, validateRunnerResults, waitForReadyPage } from '../../utils/page';
import { startServers, stopServers, PAC_PORT, type TestServers } from './server';
test.describe('PAC Proxy', () => {
@@ -32,8 +32,7 @@ test.describe('PAC Proxy', () => {
const initUserDataPath = path.join(__dirname, 'init-user-data');
const app = await launchElectronApp({ initUserDataPath, templateVars: { pacUrl } });
const page = await app.firstWindow();
await page.locator('[data-app-state="loaded"]').waitFor({ timeout: 30000 });
const page = await waitForReadyPage(app);
await setSandboxMode(page, 'pac-proxy-test', 'developer');
await runCollection(page, 'pac-proxy-test');
@@ -53,8 +52,7 @@ test.describe('PAC Proxy', () => {
const initUserDataPath = path.join(__dirname, 'init-user-data');
const app = await launchElectronApp({ initUserDataPath, templateVars: { pacUrl } });
const page = await app.firstWindow();
await page.locator('[data-app-state="loaded"]').waitFor({ timeout: 30000 });
const page = await waitForReadyPage(app);
await setSandboxMode(page, 'pac-proxy-test', 'developer');
await runCollection(page, 'pac-proxy-test');