mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 02:53:41 +08:00
Run browser UI contracts once and identify stalled requests
This commit is contained in:
@@ -449,4 +449,3 @@ assert.equal(nowSavedAdvisory.current.application.applied, false, 'A saved recom
|
||||
await import('./test_plots.mjs')
|
||||
await import('./test_settings_controls.mjs')
|
||||
await import('./test_flm_review.mjs')
|
||||
if (process.env.CI && process.platform === 'linux') await import('./test_flm_ux_browser.mjs')
|
||||
|
||||
@@ -121,7 +121,12 @@ async function until(fn) {
|
||||
}
|
||||
async function command(path, body = {}, method = 'POST', requestMs = 8000) {
|
||||
lastCommand = path
|
||||
const response = await fetch(`http://127.0.0.1:${port}${path}`, { method, ...(method === 'GET' || method === 'DELETE' ? {} : { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }), signal: AbortSignal.timeout(requestMs) })
|
||||
let response
|
||||
try {
|
||||
response = await fetch(`http://127.0.0.1:${port}${path}`, { method, ...(method === 'GET' || method === 'DELETE' ? {} : { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }), signal: AbortSignal.timeout(requestMs) })
|
||||
} catch (error) {
|
||||
throw new Error(`WebDriver ${method} ${path} failed (${requestMs} ms request limit; ${Date.now() - browserStartedAt} ms into browser checks)`, { cause: error })
|
||||
}
|
||||
const data = await response.json();if (data.value?.error) throw new Error(JSON.stringify(data.value));return data.value
|
||||
}
|
||||
const execute = (script, ...args) => command(`/session/${session}/execute/sync`, { script, args })
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "0a8fbe94bec0dcc6cd54378768f6abda7f6a2e34a9a43c088a02f2afcdfc33ad", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "5855f50f40d1b425d170523d0f505318b1ab40f9c9b32316ba45f498a0528286", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user