test(playwright): key the Configure bulk-Apply click by data-test (strict-mode collision with the grouped 'Apply to n' button)

The grouped Connection Bindings panel (77f4af0d) added a per-group
'Apply to n' button, so InstanceConfigureTests' Name = "Apply" role
locator started matching two elements and failing Playwright's strict
mode. Adds data-test="binding-bulk-apply" alongside the existing
binding-bulk-select / binding-group-apply keys and clicks that instead.

Claude-Session: https://claude.ai/code/session_01G2GHPnbbKGvyyfbr2XBRVH
This commit is contained in:
Joseph Doherty
2026-08-21 08:22:03 -04:00
parent d6a31f1cd0
commit 7a77d38abf
2 changed files with 6 additions and 2 deletions
@@ -55,7 +55,10 @@ public sealed class InstanceConfigureTests : IClassFixture<InstanceConfigureFixt
// Bulk-assign every bindable attribute to the fixture connection, then Apply + Save.
// Select by VALUE (the connection id) — most robust, since the select binds _bulkConnectionId.
await bulkSelect.SelectOptionAsync(new SelectOptionValue { Value = _cfg.ConnectionId.ToString() });
await page.GetByRole(AriaRole.Button, new() { Name = "Apply" }).ClickAsync();
// Keyed, not by accessible name: the grouped-bindings panel (77f4af0d) added a
// per-group "Apply to n" button, so a Name = "Apply" role locator now matches two
// elements and fails Playwright's strict mode.
await page.Locator("[data-test='binding-bulk-apply']").ClickAsync();
await page.GetByRole(AriaRole.Button, new() { Name = "Save Bindings" }).ClickAsync();
await Assertions.Expect(page.Locator(".toast")).ToHaveCountAsync(1, new() { Timeout = 15_000 });