diff --git a/internal/gui/tests/agent-bulk-visibility.test.cjs b/internal/gui/tests/agent-bulk-visibility.test.cjs index 959b1ac77..433b21a74 100644 --- a/internal/gui/tests/agent-bulk-visibility.test.cjs +++ b/internal/gui/tests/agent-bulk-visibility.test.cjs @@ -29,7 +29,8 @@ for (const engine of process.env.BROWSER ? [process.env.BROWSER] : ['chromium', await page.route('**/*', async (route) => { const req = route.request(), url = new URL(req.url()); const json = (data) => route.fulfill({ json: data }); - if (req.method() === 'POST') posts.push([url.pathname, req.postDataJSON()]); + // the window saying it is in use (update/using) is not the page's doing + if (req.method() === 'POST' && url.pathname !== '/api/update/using') posts.push([url.pathname, req.postDataJSON()]); if (url.pathname === '/boot.js') return route.fulfill({ contentType: 'text/javascript', body: `window.bootPrefs = ${JSON.stringify({lang, theme, web:true})};` }); if (url.pathname === '/wails/runtime.js') return route.fulfill({ contentType: 'text/javascript', body: 'export const Window = {};' }); if (url.pathname === '/api/state') return json(state); diff --git a/internal/gui/tests/agent-disconnect-preview.test.cjs b/internal/gui/tests/agent-disconnect-preview.test.cjs index 6ae54b5c9..8e8f895fe 100644 --- a/internal/gui/tests/agent-disconnect-preview.test.cjs +++ b/internal/gui/tests/agent-disconnect-preview.test.cjs @@ -35,7 +35,8 @@ function serve(lang, textSize, posts) { return async (route) => { const req = route.request(), url = new URL(req.url()); const json = (data) => route.fulfill({ json: data }); - if (req.method() === "POST") posts.push(url.pathname); + // the window saying it is in use (update/using) is not the page's doing + if (req.method() === "POST" && url.pathname !== "/api/update/using") posts.push(url.pathname); if (url.pathname === "/boot.js") return route.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = ${JSON.stringify({ lang, theme: "light", textSize, web: false })};` }); if (url.pathname === "/wails/runtime.js") return route.fulfill({ contentType: "text/javascript", body: "export const Window = {};" }); if (url.pathname === "/api/state") return json(state);