fix: use Playwright request context instead of global fetch

Addresses review feedback:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/10930#discussion_r3054600477
This commit is contained in:
bymyself
2026-04-08 18:23:32 -07:00
parent 0f811728a2
commit c32224f807

View File

@@ -434,8 +434,8 @@ export const comfyPageFixture = base.extend<{
for (const entry of entries) {
if (typeof entry.source !== 'string' && entry.url.startsWith('http')) {
try {
const resp = await fetch(entry.url)
if (resp.ok) Object.assign(entry, { source: await resp.text() })
const resp = await page.request.get(entry.url)
if (resp.ok()) Object.assign(entry, { source: await resp.text() })
} catch {
// skip unreachable scripts
}