test(e2e): document municipality locator boundary

This commit is contained in:
Francisco Ignácio Fontoura Solla 2026-08-06 19:12:32 -03:00
parent 9c99469c36
commit c1fb8c03c4

View file

@ -31,6 +31,8 @@ const municipalityContainer = (page: Page) =>
const escapeRegExp = (value: string) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
// The button keeps a state suffix; the boundary prevents "São Félix" matching
// the longer municipality "São Félix do Coribe".
const visibleMunicipalityButton = (page: Page, name: string) =>
municipalityContainer(page)
.getByRole('button', { name: new RegExp(`^${escapeRegExp(name)}(?: —|$)`) })