mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
B129 — Anchor trend-control E2E regex per codebase convention
This commit is contained in:
parent
5ded385ed9
commit
4cb21576c2
1 changed files with 7 additions and 2 deletions
|
|
@ -154,7 +154,7 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
await expect(campaignPageChrome(page, 'Municípios')).toBeVisible()
|
||||
|
||||
const trendButton = page.getByRole('button', {
|
||||
name: new RegExp(`Editar tendência política em ${municipality.name}`),
|
||||
name: new RegExp(`^Editar tendência política em ${municipality.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`),
|
||||
})
|
||||
await trendButton.click()
|
||||
const trendPopover = page.locator('[data-slot="popover-content"]')
|
||||
|
|
@ -172,7 +172,12 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
|
||||
await page.keyboard.press('Escape')
|
||||
await page.reload()
|
||||
await trendButton.click()
|
||||
await expect(campaignPageChrome(page, 'Municípios')).toBeVisible()
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: new RegExp(`^Editar tendência política em ${municipality.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`),
|
||||
})
|
||||
.click()
|
||||
const reopened = page.locator('[data-slot="popover-content"]')
|
||||
await expect(reopened.getByLabel('Tendência', { exact: true })).toHaveValue('favoravel')
|
||||
await expect(reopened.getByLabel('Justificativa')).toHaveValue(note)
|
||||
|
|
|
|||
Loading…
Reference in a new issue