mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +00:00
Merge pull request #279 from fsolla/cursor/fix-e2e-b109-sugestoes
OPS — Fix e2e FAB chrome waits and B27 advisor strict-mode
This commit is contained in:
commit
eb2b7791a3
2 changed files with 26 additions and 3 deletions
|
|
@ -79,8 +79,14 @@ export const E2E_AFFECTED_MANIFEST = [
|
|||
'src/utilities/campaignDashboardData',
|
||||
'src/lib/campaignHomeSearchHits',
|
||||
'src/lib/homeSearchShare',
|
||||
'src/lib/homeSearchExcludeCurrentEntity',
|
||||
'src/lib/homeSearchNearestMunicipalityMerge',
|
||||
'src/lib/homeSearchSuggest',
|
||||
'src/lib/homeSearchUi',
|
||||
],
|
||||
specs: ['campaignHomeActions'],
|
||||
// Home search suggest/exclude is exercised on municipality detail (B109)
|
||||
// as well as the home action suite.
|
||||
specs: ['campaignHomeActions', 'campaignMunicipalities'],
|
||||
},
|
||||
{
|
||||
prefixes: [
|
||||
|
|
|
|||
|
|
@ -94,7 +94,11 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
)
|
||||
await expect(campaignPageChrome(page, 'Municípios')).toBeVisible()
|
||||
|
||||
const advisorsTrigger = page.getByRole('button', { name: 'Editar assessores' }).first()
|
||||
// Name includes the município — a substring search can return neighbors
|
||||
// (strict-mode flake when two "Editar assessores …" buttons match).
|
||||
const advisorsTrigger = page.getByRole('button', {
|
||||
name: `Editar assessores em ${municipality.name}`,
|
||||
})
|
||||
await advisorsTrigger.click()
|
||||
|
||||
const advisorsPopover = page.locator('[data-slot="popover-content"]')
|
||||
|
|
@ -119,12 +123,24 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
|
||||
// The popover stays open after the write (auto-save, not submit+close).
|
||||
await expect(advisorsPopover).toBeVisible()
|
||||
// Trigger label flips from "sem assessor" only after the write lands —
|
||||
// wait for that before Escape/reload so we do not race optimistic chips.
|
||||
await expect(
|
||||
page.getByRole('button', {
|
||||
name: `Editar assessores em ${municipality.name} — ${advisor.name}`,
|
||||
}),
|
||||
).toBeVisible()
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
// Persistence: reload and reopen to confirm the server, not just local
|
||||
// state, now holds the assignment.
|
||||
await page.reload()
|
||||
await page.getByRole('button', { name: 'Editar assessores' }).first().click()
|
||||
await expect(campaignPageChrome(page, 'Municípios')).toBeVisible()
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: `Editar assessores em ${municipality.name} — ${advisor.name}`,
|
||||
})
|
||||
.click()
|
||||
await expect(
|
||||
page.locator('[data-slot="popover-content"]').getByRole('button', {
|
||||
name: `Remover ${advisor.name}`,
|
||||
|
|
@ -498,6 +514,7 @@ test.describe('Municípios — FAB overlay polish (B126)', () => {
|
|||
await suggestResponse
|
||||
await expect(overlay.getByRole('link', { name: 'Registrar sinal' })).toBeHidden()
|
||||
|
||||
// Overlay scopes search suggest — list page has no E11 SuggestionsPanel.
|
||||
await expect(overlay.getByRole('region', { name: 'Sugestões' })).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue