Ensure postpone button styling and text are correct for all devices

Add assertions to verify the styling classes and text content of the postpone button in the executive meetings row quick actions spec.
This commit is contained in:
Riyadh
2026-05-11 13:03:39 +00:00
parent e45e15a70a
commit 1c8e832f27
@@ -187,9 +187,20 @@ test("popover only exposes Postpone — Move up/down buttons retired in #489", a
await page.locator(`[data-testid="em-row-${id}"]`).click();
const popover = page.locator(`[data-testid="em-row-quick-${id}"]`);
await expect(popover).toBeVisible();
await expect(
popover.locator(`[data-testid="em-row-quick-postpone-${id}"]`),
).toBeVisible();
const postponeBtn = popover.locator(
`[data-testid="em-row-quick-postpone-${id}"]`,
);
await expect(postponeBtn).toBeVisible();
// #490 polish: Postpone uses the design-system Button — guard the
// tap target + min-width affordance so a future styling regression
// doesn't silently revert it back to a plain text button on iPad.
const cls = (await postponeBtn.getAttribute("class")) ?? "";
expect(cls).toContain("h-10");
expect(cls).toContain("min-w-[11rem]");
// Icon + label both rendered (icon flips with locale via flex
// direction so it stays adjacent to the label in RTL).
await expect(postponeBtn.locator("svg")).toHaveCount(1);
await expect(postponeBtn).toContainText(/postpone|تأجيل/i);
// Hard guard: the old up/down buttons must no longer mount.
await expect(
popover.locator(`[data-testid="em-row-quick-up-${id}"]`),