mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
test(B113): fix wizard chrome e2e and municipality href strictness
This commit is contained in:
parent
b8b2aa4d72
commit
884ad67c50
4 changed files with 5 additions and 19 deletions
|
|
@ -61,10 +61,6 @@ import {
|
|||
type SupportStatus,
|
||||
} from '@/lib/schemas/leadership'
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
WIZARD_THUMB_TILE_GRID_CLASS,
|
||||
WIZARD_THUMB_TILE_ITEM_CLASS,
|
||||
} from '@/lib/wizardThumbGrid'
|
||||
import {
|
||||
resolveWizardChainEntry,
|
||||
wizardChainContinueHref,
|
||||
|
|
@ -75,6 +71,7 @@ import {
|
|||
resolveWizardLeadershipSkip,
|
||||
type WizardLeadershipTileViewModel,
|
||||
} from '@/lib/wizardLeadershipContract'
|
||||
import { WIZARD_THUMB_TILE_GRID_CLASS, WIZARD_THUMB_TILE_ITEM_CLASS } from '@/lib/wizardThumbGrid'
|
||||
import { fieldError } from '@/utilities/campaignFormFields'
|
||||
import { supportStatusLabels } from '@/utilities/leadership/leadershipLabels'
|
||||
|
||||
|
|
@ -235,12 +232,7 @@ export const WizardLeadershipStep = ({
|
|||
{tiles.length === 0 ? (
|
||||
<p className="text-sm text-muted-foreground">{WIZARD_LEADERSHIP_EMPTY_GRID}</p>
|
||||
) : null}
|
||||
<ul
|
||||
className={cn(
|
||||
WIZARD_THUMB_TILE_GRID_CLASS,
|
||||
'md:grid-cols-3 lg:grid-cols-4',
|
||||
)}
|
||||
>
|
||||
<ul className={cn(WIZARD_THUMB_TILE_GRID_CLASS, 'md:grid-cols-3 lg:grid-cols-4')}>
|
||||
{tiles.map((tile) => (
|
||||
<li key={tile.id} className={WIZARD_THUMB_TILE_ITEM_CLASS}>
|
||||
<LeadershipTileButton
|
||||
|
|
|
|||
|
|
@ -32,15 +32,8 @@ import {
|
|||
import type { PoliticalTrendStatusValue } from '@/lib/schemas/municipality'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { wizardChainEndHref } from '@/lib/wizardActionChain'
|
||||
<<<<<<< HEAD
|
||||
import { wizardStepPreviousHref } from '@/lib/wizardBack'
|
||||
import {
|
||||
WIZARD_THUMB_TILE_GRID_CLASS,
|
||||
WIZARD_THUMB_TILE_ITEM_CLASS,
|
||||
} from '@/lib/wizardThumbGrid'
|
||||
=======
|
||||
import { WIZARD_THUMB_TILE_GRID_CLASS, WIZARD_THUMB_TILE_ITEM_CLASS } from '@/lib/wizardThumbGrid'
|
||||
>>>>>>> 06332987 (style: Prettier format B113 files)
|
||||
|
||||
type WizardTrendChoiceStepProps = {
|
||||
actionSlug: string
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ test.describe('Wizard — busca município (B60)', () => {
|
|||
await search.fill(municipality.name)
|
||||
|
||||
const results = page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE })
|
||||
const hit = results.locator(`a[href*="municipio=${municipality.slug}"]`)
|
||||
const hit = results.locator(`a[href$="municipio=${municipality.slug}"]`)
|
||||
await expect(hit).toBeVisible({ timeout: 15000 })
|
||||
await hit.click()
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,10 @@ test.describe('Wizard — header mobile (B75)', () => {
|
|||
await campaign.login(page, coordinator.email!, coordinator.password)
|
||||
await page.goto(`/campanha/acoes/atualizar-votos?municipio=${municipality.slug}`)
|
||||
|
||||
await expect(page.getByRole('heading', { name: 'Ajustar votos estimados' })).toBeVisible({
|
||||
await expect(page.getByRole('main', { name: /Ação: Ajustar votos/i })).toBeVisible({
|
||||
timeout: 15000,
|
||||
})
|
||||
await expect(page.getByRole('textbox', { name: 'Média' })).toBeVisible()
|
||||
|
||||
const topBar = page.locator('[data-slot="campaign-mobile-top-bar"][data-mode="wizard"]')
|
||||
await expect(topBar.getByText('Ajustar votos', { exact: true })).toBeVisible()
|
||||
|
|
|
|||
Loading…
Reference in a new issue