mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Close the same hydration race on the three remaining menu triggers
The add-measurement journey and the two accessibility steps that open a dropdown all did what the water journey did: wait for the network, click the trigger, then wait for a menu item. All three clicked markup React had not wired up yet, and the add-measurement one timed out on the trunk's own runner for exactly that reason. They open through the same helper now. The documents bulk-bar menu keeps its plain click deliberately: it fires after selecting fifty rows, so hydration is not in question there and a retry would only hide a real failure.
This commit is contained in:
1 parent
ef63d7b458
commit
9eb5db4c35
2 files changed
+20
-12
No files matched your search
+13
-8
@@ -3,6 +3,7 @@ import type { Locator, Page, Route } from "@playwright/test";
|
||||
import { expect, test } from "./setup/test";
|
||||
|
||||
import { STORAGE_STATE_PATH } from "./setup/global-setup";
|
||||
import { openMenu } from "./open-menu";
|
||||
import { POPULATED_SUMMARIES } from "./utils/mock-dashboard-snapshot";
|
||||
|
||||
type AxeViolation = Awaited<
|
||||
@@ -902,10 +903,12 @@ test.describe("axe-core authenticated route and state matrix", () => {
|
||||
await expect(page.locator('[data-slot="lab-list"]')).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
await page
|
||||
.locator('#main-content [data-slot="dropdown-menu-trigger"]')
|
||||
.first()
|
||||
.click();
|
||||
await openMenu(
|
||||
page,
|
||||
page
|
||||
.locator('#main-content [data-slot="dropdown-menu-trigger"]')
|
||||
.first(),
|
||||
);
|
||||
await page.getByRole("menuitem").first().click();
|
||||
const sheet = page.locator('[data-slot="responsive-sheet-content"]');
|
||||
await expect(sheet.locator('input[type="file"]')).toHaveCount(1);
|
||||
@@ -947,10 +950,12 @@ test.describe("axe-core authenticated route and state matrix", () => {
|
||||
await expect(page.locator("[data-medication-id]").first()).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
await page
|
||||
.locator('#main-content [data-slot="dropdown-menu-trigger"]')
|
||||
.first()
|
||||
.click();
|
||||
await openMenu(
|
||||
page,
|
||||
page
|
||||
.locator('#main-content [data-slot="dropdown-menu-trigger"]')
|
||||
.first(),
|
||||
);
|
||||
await page.getByRole("menuitem").last().click();
|
||||
const dialog = page.locator('[data-slot="medication-wizard-dialog"]');
|
||||
blocking.push(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { expect, test } from "./setup/test";
|
||||
|
||||
import { STORAGE_STATE_PATH } from "./setup/global-setup";
|
||||
import { openMenu } from "./open-menu";
|
||||
|
||||
/**
|
||||
* Add-measurement flow — exercises the dashboard's quick-entry dropdown,
|
||||
@@ -109,10 +110,12 @@ test.describe("add measurement flow", () => {
|
||||
// at the top-right of `<main>`. Scope the locator there so we don't
|
||||
// accidentally match an "Add" button on the sidebar.
|
||||
const main = page.locator("main");
|
||||
await main
|
||||
.getByRole("button", { name: /^add$|hinzufügen|hinzufuegen/i })
|
||||
.first()
|
||||
.click();
|
||||
await openMenu(
|
||||
page,
|
||||
main
|
||||
.getByRole("button", { name: /^add$|hinzufügen|hinzufuegen/i })
|
||||
.first(),
|
||||
);
|
||||
|
||||
// v1.5 phase-5: the menu items now have distinct labels — the
|
||||
// measurement entry says "Measurement" / "Messung" instead of "Add",
|
||||
|
||||
Reference in new issue
Block a user