Improve profile runtime controls (#868)

* Improve profile runtime controls

* Restore profile selector test id

* Update profile switch e2e flow
This commit is contained in:
ekko
2026-05-20 12:59:34 +08:00
committed by GitHub
parent 479fef8a84
commit 663afb61ff
15 changed files with 864 additions and 40 deletions
+18
View File
@@ -159,6 +159,24 @@ export async function mockHermesApi(page: Page, options: MockHermesApiOptions =
return
}
if (pathname === '/api/hermes/profiles/runtime-statuses') {
await route.fulfill(jsonResponse({
profiles: [
{
profile: 'default',
bridge: { running: activeProfileName === 'default', profile: 'default', reachable: true },
gateway: { running: true, profile: 'default' },
},
{
profile: 'research',
bridge: { running: activeProfileName === 'research', profile: 'research', reachable: true },
gateway: { running: true, profile: 'research' },
},
],
}))
return
}
if (pathname === '/api/hermes/profiles/active') {
if (request.method() !== 'PUT') {
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))