test(playwright): update pager/markup selectors to M10 component hooks (INT)

This commit is contained in:
Joseph Doherty
2026-06-18 20:41:43 -04:00
parent 023c4f7cde
commit 8270a603d3
3 changed files with 25 additions and 27 deletions
@@ -409,13 +409,13 @@ public class NotificationActionTests
await page.Locator("button.btn-primary:has-text('Query')").ClickAsync();
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
// Pager locators. Previous/Next are scoped by their text (the page header's
// Refresh button is also a .btn-outline-secondary.btn-sm). The indicator span is
// the pager's only `span.text-muted.small` once rows render — the "Loading…"
// placeholder that shares that class renders only while `_notifications == null`.
var prev = page.Locator("button.btn-outline-secondary.btn-sm:has-text('Previous')");
var next = page.Locator("button.btn-outline-secondary.btn-sm:has-text('Next')");
var indicator = page.Locator(".d-flex.justify-content-between.align-items-center span.text-muted.small");
// Pager locators (M10 OffsetPager). Previous/Next are the pager's data-test
// hooks (the page header's Refresh button is also a .btn-outline-secondary.btn-sm,
// so we no longer scope by text). The summary span carries the page/total readout
// ("Page {N} of {Y} · {Total} total").
var prev = page.Locator("[data-test='pager-prev']");
var next = page.Locator("[data-test='pager-next']");
var indicator = page.Locator("[data-test='pager-summary']");
// ── Page 1 ── (count first — it waits out the fetch — then indicator + buttons).
await Assertions.Expect(page.Locator("tbody tr")).ToHaveCountAsync(50, new() { Timeout = 15_000 });