mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-13 00:34:43 +00:00
Stabilize Safari E2E contracts
This commit is contained in:
parent
9f870bf474
commit
dee1f9c0be
2 changed files with 17 additions and 4 deletions
|
|
@ -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([]);
|
||||
|
|
|
|||
|
|
@ -44,8 +44,16 @@ test("powered-off tolerance preserves inheritance, explicit zero, and strict val
|
|||
};
|
||||
const updates: Array<Record<string, unknown>> = [];
|
||||
|
||||
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.", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue