mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
fix(e2e): update activity E2E for C14 tags form (no kind/origin)
This commit is contained in:
parent
adc29c0379
commit
39c5e931ca
1 changed files with 11 additions and 5 deletions
|
|
@ -3,7 +3,7 @@ import { campaignPageChrome, expect, test } from './fixtures/campaignE2EFixtures
|
|||
test.describe('Atividades — registro-fundação', () => {
|
||||
test.setTimeout(90_000)
|
||||
|
||||
test('registra origem, cria demandas vinculadas e exibe a explicação dos sinais', async ({
|
||||
test('cria compromisso com tags, demandas vinculadas e exibe os sinais no município', async ({
|
||||
campaign,
|
||||
page,
|
||||
}) => {
|
||||
|
|
@ -21,8 +21,13 @@ test.describe('Atividades — registro-fundação', () => {
|
|||
await page.goto(`${campaign.baseURL}/campanha/atividades/nova`)
|
||||
|
||||
await page.getByLabel('Título *').fill(activityTitle)
|
||||
await page.getByLabel('Tipo de atividade *').selectOption('caminhada')
|
||||
await page.getByLabel('Origem da atividade').selectOption('obrigacao_politica')
|
||||
// Tags: type and press Enter to add each tag
|
||||
const tagInput = page.locator('input[list="activity-tags-datalist"]')
|
||||
await tagInput.fill('Caminhada')
|
||||
await tagInput.press('Enter')
|
||||
await tagInput.fill('Territorial')
|
||||
await tagInput.press('Enter')
|
||||
await page.getByLabel('Início *').fill('2026-08-15T10:00')
|
||||
await page.getByLabel('Município *').selectOption(String(municipality.id))
|
||||
|
||||
await page.getByRole('button', { name: 'Adicionar demanda' }).click()
|
||||
|
|
@ -32,12 +37,13 @@ test.describe('Atividades — registro-fundação', () => {
|
|||
await page.getByLabel('Título da demanda 2').fill(materialDemand)
|
||||
await page.getByLabel('Tipo da demanda 2').selectOption('material')
|
||||
|
||||
await page.getByRole('button', { name: 'Criar atividade' }).click()
|
||||
await page.getByRole('button', { name: 'Criar compromisso' }).click()
|
||||
await expect(page).toHaveURL(/\/campanha\/atividades\/[^/?]+$/)
|
||||
await expect(campaignPageChrome(page, activityTitle)).toBeVisible({
|
||||
timeout: 15_000,
|
||||
})
|
||||
await expect(page.getByText('Obrigação política', { exact: true })).toBeVisible()
|
||||
await expect(page.getByText('Caminhada', { exact: true })).toBeVisible()
|
||||
await expect(page.getByText('Territorial', { exact: true })).toBeVisible()
|
||||
await expect(page.getByRole('link', { name: transportDemand })).toBeVisible()
|
||||
await expect(page.getByRole('link', { name: materialDemand })).toBeVisible()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue