diff --git a/tests/integration/tests/38-vmware-ai-chat-mentions.spec.ts b/tests/integration/tests/38-vmware-ai-chat-mentions.spec.ts index 0aabe63507..9c56a685ef 100644 --- a/tests/integration/tests/38-vmware-ai-chat-mentions.spec.ts +++ b/tests/integration/tests/38-vmware-ai-chat-mentions.spec.ts @@ -78,7 +78,8 @@ test.describe('VMware AI chat mentions', () => { .filter({ hasText: /esxi-01\.lab\.local/ }) .first(); await expect(hostOption).toBeVisible({ timeout: 30_000 }); - await hostOption.click(); + await expect(hostOption).toHaveAttribute('aria-selected', 'true'); + await textarea.press('Enter'); await expect(textarea).toHaveValue('@esxi-01.lab.local '); // API-backed vSphere VMs use the same shared mention contract, carrying @@ -91,7 +92,8 @@ test.describe('VMware AI chat mentions', () => { .filter({ hasText: /warehouse-api-01/ }) .first(); await expect(vmOption).toBeVisible({ timeout: 30_000 }); - await vmOption.click(); + await expect(vmOption).toHaveAttribute('aria-selected', 'true'); + await textarea.press('Enter'); await expect(textarea).toHaveValue('@warehouse-api-01 '); expect(unexpectedVMwareRequests).toEqual([]); diff --git a/tests/integration/tests/85-powered-off-tolerance.spec.ts b/tests/integration/tests/85-powered-off-tolerance.spec.ts index 37abe97d1d..d371e0bf30 100644 --- a/tests/integration/tests/85-powered-off-tolerance.spec.ts +++ b/tests/integration/tests/85-powered-off-tolerance.spec.ts @@ -44,8 +44,16 @@ test("powered-off tolerance preserves inheritance, explicit zero, and strict val }; const updates: Array> = []; - await page.route("**/api/resources?**", async (route: Route) => { + // Keep this policy contract deterministic. Live inventory frames can arrive + // after the REST response and replace the single resource fixture. + await page.routeWebSocket("**/ws*", () => {}); + + await page.route("**/api/resources**", async (route: Route) => { const url = new URL(route.request().url()); + if (url.pathname !== "/api/resources") { + await route.continue(); + return; + } const pageNumber = Number(url.searchParams.get("page") ?? "1"); const data = pageNumber === 1 @@ -135,7 +143,10 @@ test("powered-off tolerance preserves inheritance, explicit zero, and strict val const override = page.getByRole("spinbutton", { name: /Grace override \(seconds\)/, }); - await override.fill("1.5"); + // Exponent syntax is valid for a number input, but intentionally rejected by + // the policy's whole-number grammar. WebKit clears step-invalid decimals. + await override.fill("1e2"); + await expect(override).toHaveValue("1e2"); await page.getByRole("button", { name: "Save override" }).click(); await expect( page.getByText("Grace override must be a whole number of seconds.", {