mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 13:13:05 +00:00
test(B195): migrar e2e B85 do cadastro de demanda ao campo único
This commit is contained in:
parent
712d40f83f
commit
6fe38b332c
1 changed files with 6 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import type { Page } from '@playwright/test'
|
import type { Page } from '@playwright/test'
|
||||||
|
|
||||||
import { SUPPORTER_REGISTRATION_CONSENT_KEY } from '../../src/lib/campaignConsentKeys.js'
|
import { SUPPORTER_REGISTRATION_CONSENT_KEY } from '../../src/lib/campaignConsentKeys.js'
|
||||||
|
import { fallbackDemandTitle } from '../../src/lib/demandTitle.js'
|
||||||
import {
|
import {
|
||||||
ensureLeasedConsent,
|
ensureLeasedConsent,
|
||||||
SUPPORTER_REGISTRATION_CONSENT_LEASE_KEY,
|
SUPPORTER_REGISTRATION_CONSENT_LEASE_KEY,
|
||||||
|
|
@ -726,13 +727,15 @@ test.describe('Municípios — jornadas por papel', () => {
|
||||||
})
|
})
|
||||||
fixtures.touchMunicipality(municipality.id)
|
fixtures.touchMunicipality(municipality.id)
|
||||||
|
|
||||||
const demandTitle = fixtures.value('Carro de som')
|
// B195: single free-text field; the title is derived server-side (fallback
|
||||||
|
// truncation without a DEEPSEEK_API_KEY in the e2e app).
|
||||||
|
const demandText = fixtures.value('Carro de som: precisamos para a caminhada de sábado.')
|
||||||
|
const demandTitle = fallbackDemandTitle(demandText)
|
||||||
|
|
||||||
await campaign.login(page, advisor.email!, password)
|
await campaign.login(page, advisor.email!, password)
|
||||||
await page.goto(`${campaign.baseURL}/campanha/demandas/nova`)
|
await page.goto(`${campaign.baseURL}/campanha/demandas/nova`)
|
||||||
await page.getByLabel('O que você precisa?').fill(demandTitle)
|
|
||||||
await page.getByLabel('Município').selectOption({ label: municipality.name })
|
await page.getByLabel('Município').selectOption({ label: municipality.name })
|
||||||
await page.getByLabel('Detalhe a necessidade').fill('Precisamos para a caminhada de sábado.')
|
await page.getByLabel('O que você precisa?').fill(demandText)
|
||||||
await page.getByRole('button', { name: 'Abrir demanda' }).click()
|
await page.getByRole('button', { name: 'Abrir demanda' }).click()
|
||||||
await expect(campaignPageChrome(page, demandTitle)).toBeVisible()
|
await expect(campaignPageChrome(page, demandTitle)).toBeVisible()
|
||||||
await expect(page.getByRole('button', { name: 'Aprovar' })).toBeVisible()
|
await expect(page.getByRole('button', { name: 'Aprovar' })).toBeVisible()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue