mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-22 13:05:19 +00:00
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, '\\$&')
|
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) =>
|
const visibleMunicipalityButton = (page: Page, name: string) =>
|
||||||
municipalityContainer(page)
|
municipalityContainer(page)
|
||||||
.getByRole('button', { name: new RegExp(`^${escapeRegExp(name)}(?: —|$)`) })
|
.getByRole('button', { name: new RegExp(`^${escapeRegExp(name)}(?: —|$)`) })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue