test(e2e): document municipality locator boundary
This commit is contained in:
parent
9c99469c36
commit
c1fb8c03c4
1 changed files with 2 additions and 0 deletions
|
|
@ -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)}(?: —|$)`) })
|
||||
|
|
|
|||
Loading…
Reference in a new issue