mirror of
https://github.com/fsolla/teqo.git
synced 2026-12-06 01:23:04 +00:00
test(e2e): fix C87 unified-update specs (polarity + adversary signal)
This commit is contained in:
parent
212a1f2423
commit
11a9f45d69
4 changed files with 12 additions and 10 deletions
|
|
@ -45,11 +45,12 @@ test.describe('Atividades — registro-fundação', () => {
|
||||||
await expect(page.getByLabel('Município')).toHaveValue(String(municipality.id))
|
await expect(page.getByLabel('Município')).toHaveValue(String(municipality.id))
|
||||||
|
|
||||||
await page.goto(`${campaign.baseURL}/campanha/municipios/${municipality.slug}?tab=updates`)
|
await page.goto(`${campaign.baseURL}/campanha/municipios/${municipality.slug}?tab=updates`)
|
||||||
await page.getByLabel('Tipo', { exact: true }).selectOption('sinal')
|
// Unified C87 surface: body + polarity + urgent + adversary signal, no
|
||||||
await expect(page.getByText('Invasão:', { exact: true })).toBeVisible()
|
// legacy kind/signal-type navigation.
|
||||||
await expect(page.getByText('Adversário ocupando nosso espaço.')).toBeVisible()
|
await expect(page.getByLabel('Texto da atualização')).toBeVisible()
|
||||||
await expect(page.getByText('Rede esfriou:', { exact: true })).toBeVisible()
|
await expect(page.getByLabel('Polaridade')).toBeVisible()
|
||||||
await expect(page.getByText('Adversário apareceu:', { exact: true })).toBeVisible()
|
await expect(page.getByLabel('Sinalizar como urgente')).toBeVisible()
|
||||||
await expect(page.getByText('Alguém pediu algo:', { exact: true })).toBeVisible()
|
await expect(page.getByLabel('Sinalizar adversário')).toBeVisible()
|
||||||
|
await expect(page.getByLabel('Tipo', { exact: true })).toHaveCount(0)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,7 @@ test.describe('Wizard — registrar atualização (C87)', () => {
|
||||||
`/campanha/acoes/mudar-tendencia\\?municipio=${municipality.slug}&entry=register-update`,
|
`/campanha/acoes/mudar-tendencia\\?municipio=${municipality.slug}&entry=register-update`,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await expect(page.getByText('Atualização registrada.')).toBeVisible()
|
await expect(page.getByText('Atualização registrada com sucesso.')).toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('renders the unified fields without legacy signal-type navigation', async ({
|
test('renders the unified fields without legacy signal-type navigation', async ({
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ test.describe('Municípios — jornadas por papel', () => {
|
||||||
await expect(reopened.getByLabel('Justificativa')).toHaveValue(note)
|
await expect(reopened.getByLabel('Justificativa')).toHaveValue(note)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('coordinator registers a typed signal from the list freshness cell', async ({
|
test('coordinator registers an adversary-signal update from the list freshness cell', async ({
|
||||||
campaign,
|
campaign,
|
||||||
page,
|
page,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
@ -434,7 +434,8 @@ test.describe('Municípios — jornadas por papel', () => {
|
||||||
await signalForm
|
await signalForm
|
||||||
.getByRole('textbox', { name: 'Texto' })
|
.getByRole('textbox', { name: 'Texto' })
|
||||||
.fill('Liderança local reportou visita adversária na feira.')
|
.fill('Liderança local reportou visita adversária na feira.')
|
||||||
await signalForm.getByLabel('Tipo do sinal').selectOption('visita_adversario')
|
await signalForm.getByLabel('Polaridade').selectOption('ruim')
|
||||||
|
await signalForm.getByLabel('Sinalizar adversário').check()
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
expectPostResponse(page, '/campanha/municipios'),
|
expectPostResponse(page, '/campanha/municipios'),
|
||||||
signalForm.getByRole('button', { name: 'Registrar atualização', exact: true }).click(),
|
signalForm.getByRole('button', { name: 'Registrar atualização', exact: true }).click(),
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ const expectedHeadersAt = (width: number) => {
|
||||||
if (width >= 66 * REM_IN_PIXELS) headers.push('Liderança')
|
if (width >= 66 * REM_IN_PIXELS) headers.push('Liderança')
|
||||||
if (width >= 72 * REM_IN_PIXELS) headers.push('Dobradinha')
|
if (width >= 72 * REM_IN_PIXELS) headers.push('Dobradinha')
|
||||||
if (width >= 78 * REM_IN_PIXELS) headers.push('Cobertura')
|
if (width >= 78 * REM_IN_PIXELS) headers.push('Cobertura')
|
||||||
headers.push('Sinal')
|
headers.push('Atualização')
|
||||||
return headers
|
return headers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue