{chrome.stepKind === 'continue' && chrome.previousHref ? (
) : (
diff --git a/src/components/campaign/shell/CampaignWizardChromeContext.tsx b/src/components/campaign/shell/CampaignWizardChromeContext.tsx
index 79a0cf37..2024bef3 100644
--- a/src/components/campaign/shell/CampaignWizardChromeContext.tsx
+++ b/src/components/campaign/shell/CampaignWizardChromeContext.tsx
@@ -2,9 +2,11 @@
import {
createContext,
+ useCallback,
useContext,
useLayoutEffect,
useMemo,
+ useRef,
useState,
type Dispatch,
type ReactNode,
@@ -28,13 +30,28 @@ export type CampaignWizardChromeState = {
type CampaignWizardChromeContextValue = {
chrome: CampaignWizardChromeState | null
setChrome: Dispatch
>
+ requestBack: () => void
+ setBackHandler: (handler: (() => void) | null) => void
}
const CampaignWizardChromeContext = createContext(null)
export const CampaignWizardChromeProvider = ({ children }: { children: ReactNode }) => {
const [chrome, setChrome] = useState(null)
- const value = useMemo(() => ({ chrome, setChrome }), [chrome])
+ const backHandlerRef = useRef<(() => void) | null>(null)
+
+ const setBackHandler = useCallback((handler: (() => void) | null) => {
+ backHandlerRef.current = handler
+ }, [])
+
+ const requestBack = useCallback(() => {
+ backHandlerRef.current?.()
+ }, [])
+
+ const value = useMemo(
+ () => ({ chrome, setChrome, requestBack, setBackHandler }),
+ [chrome, requestBack, setBackHandler],
+ )
return (
@@ -54,6 +71,9 @@ const useCampaignWizardChromeContext = (): CampaignWizardChromeContextValue => {
export const useCampaignWizardChrome = (): CampaignWizardChromeState | null =>
useCampaignWizardChromeContext().chrome
+export const useCampaignWizardRequestBack = (): (() => void) =>
+ useCampaignWizardChromeContext().requestBack
+
type CampaignWizardChromeInput = {
flowTitle: string
isEntryStep: boolean
@@ -93,3 +113,15 @@ export const useSetCampaignWizardChrome = (state: CampaignWizardChromeState | nu
[setChrome],
)
}
+
+/** Registers the shared Voltar / Android back handler for the active wizard shell (B114). */
+export const useSetCampaignWizardBackHandler = (handler: (() => void) | null): void => {
+ const { setBackHandler } = useCampaignWizardChromeContext()
+
+ useLayoutEffect(() => {
+ setBackHandler(handler)
+ return () => {
+ setBackHandler(null)
+ }
+ }, [handler, setBackHandler])
+}
diff --git a/src/lib/wizardBack.ts b/src/lib/wizardBack.ts
new file mode 100644
index 00000000..e0d224cf
--- /dev/null
+++ b/src/lib/wizardBack.ts
@@ -0,0 +1,121 @@
+/**
+ * B114 — shared wizard back contract (header Voltar = Android / browser back).
+ * Pure resolution + history-state marks; no DOM.
+ */
+
+import {
+ wizardActionHref,
+ wizardSignalHref,
+ wizardTrendHref,
+ type CampaignWizardActionId,
+} from '@/lib/campaignActionRoutes'
+
+/** Synthetic history mark for URL-step / entry back interception. */
+export const WIZARD_BACK_HISTORY_KEY = 'teqoWizardBack' as const
+
+/** Synthetic history mark for client-only layers (leadership form). */
+export const WIZARD_LAYER_HISTORY_KEY = 'teqoWizardLayer' as const
+
+export const WIZARD_LEADERSHIP_FORM_LAYER = 'leadership-form' as const
+
+export type WizardClientLayer = typeof WIZARD_LEADERSHIP_FORM_LAYER
+
+export type WizardBackHistoryState = {
+ [WIZARD_BACK_HISTORY_KEY]?: true
+ [WIZARD_LAYER_HISTORY_KEY]?: WizardClientLayer
+}
+
+export type WizardBackTarget =
+ | { kind: 'navigate'; href: string }
+ | { kind: 'pop-layer'; layer: WizardClientLayer }
+
+type WizardBackStepId =
+ | 'municipality-search'
+ | 'expected-votes'
+ | 'signal-type'
+ | 'signal-body'
+ | 'trend-choice'
+ | 'trend-note'
+ | 'leadership-grid'
+ | 'leadership-form'
+
+export type ResolveWizardBackInput = {
+ stepKind: 'entry' | 'continue'
+ previousHref?: string
+ dismissHref: string
+ clientLayer?: WizardClientLayer | null
+}
+
+/** Single back action for header Voltar and Android / browser popstate. */
+export const resolveWizardBack = (input: ResolveWizardBackInput): WizardBackTarget => {
+ if (input.clientLayer) {
+ return { kind: 'pop-layer', layer: input.clientLayer }
+ }
+ if (input.stepKind === 'entry') {
+ return { kind: 'navigate', href: input.dismissHref }
+ }
+ if (input.previousHref) {
+ return { kind: 'navigate', href: input.previousHref }
+ }
+ return { kind: 'navigate', href: input.dismissHref }
+}
+
+export type WizardStepPreviousHrefInput = {
+ step: Exclude
+ actionSlug: string
+ municipalitySlug?: string
+ entryAction?: CampaignWizardActionId
+ returnPath?: string
+}
+
+/**
+ * Canonical previousHref per URL step. Leadership form is a client layer
+ * (pop-layer), not an href — callers set `clientLayer` instead.
+ */
+export const wizardStepPreviousHref = (input: WizardStepPreviousHrefInput): string => {
+ const { step, actionSlug, municipalitySlug, entryAction, returnPath } = input
+
+ switch (step) {
+ case 'expected-votes':
+ case 'signal-type':
+ case 'trend-choice':
+ case 'leadership-grid':
+ return wizardActionHref(actionSlug, undefined, { returnPath })
+ case 'signal-body':
+ return wizardSignalHref(actionSlug, municipalitySlug, undefined, entryAction, returnPath)
+ case 'trend-note':
+ return wizardTrendHref(
+ actionSlug,
+ municipalitySlug,
+ undefined,
+ entryAction,
+ undefined,
+ returnPath,
+ )
+ default: {
+ const _exhaustive: never = step
+ return _exhaustive
+ }
+ }
+}
+
+export const isWizardBackHistoryState = (state: unknown): state is WizardBackHistoryState =>
+ typeof state === 'object' &&
+ state !== null &&
+ (state as Record)[WIZARD_BACK_HISTORY_KEY] === true
+
+export const isWizardLayerHistoryState = (
+ state: unknown,
+): state is WizardBackHistoryState & { [WIZARD_LAYER_HISTORY_KEY]: WizardClientLayer } =>
+ typeof state === 'object' &&
+ state !== null &&
+ (state as Record)[WIZARD_LAYER_HISTORY_KEY] === WIZARD_LEADERSHIP_FORM_LAYER
+
+/**
+ * After popstate, handle when we had pushed a synthetic wizard entry and
+ * are not closing that entry ourselves.
+ */
+export const shouldHandleWizardBackPopstate = (input: {
+ wasHistoryPushed: boolean
+ closingProgrammatically: boolean
+}): boolean => input.wasHistoryPushed && !input.closingProgrammatically
diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts
index 3df22418..a569125f 100644
--- a/tests/e2e/campaignMunicipalities.e2e.spec.ts
+++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts
@@ -115,7 +115,9 @@ test.describe('Municípios — jornadas por papel', () => {
)
await expect(page.getByRole('heading', { name: 'Municípios', exact: true })).toBeVisible()
- const advisorsTrigger = page.getByRole('button', { name: 'Editar assessores' })
+ const advisorsTrigger = page.getByRole('button', {
+ name: new RegExp(`^Editar assessores em ${municipality.name}\\b`),
+ })
await advisorsTrigger.click()
const advisorsPopover = page.locator('[data-slot="popover-content"]')
@@ -145,7 +147,11 @@ test.describe('Municípios — jornadas por papel', () => {
// 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' }).click()
+ await page
+ .getByRole('button', {
+ name: new RegExp(`^Editar assessores em ${municipality.name}\\b`),
+ })
+ .click()
await expect(
page.locator('[data-slot="popover-content"]').getByRole('button', {
name: `Remover ${advisor.name}`,
@@ -506,14 +512,18 @@ test.describe('Municípios — bottom drawer polish (B109)', () => {
const search = page.getByLabel('Buscar na campanha')
await search.focus()
await expect(page.getByRole('link', { name: 'Mudar tendência' })).toBeHidden()
-
+ // Wait for the FULL snap to settle — measuring mid-animation flakes in CI
+ // (handle y hovered ~60–100px before the sheet finished covering the viewport).
+ await expect(page.locator('[data-snap="full"]')).toBeVisible()
const handle = page.getByRole('button', { name: 'Ocultar ações rápidas' })
- const handleBox = await handle.boundingBox()
- expect(handleBox).toBeTruthy()
- // Fullscreen search docks the strip under the safe-area top bar; allow a
- // few px of layout jitter (subpixel / font metrics) without losing the
- // "near the top" assertion.
- expect(handleBox!.y).toBeLessThan(48)
+ await expect
+ .poll(async () => {
+ const box = await handle.boundingBox()
+ return box?.y ?? Number.POSITIVE_INFINITY
+ })
+ // Fullscreen docks under the safe-area top bar; allow a few px of layout
+ // jitter once the FULL snap has settled (mid-animation y hovered ~60–100).
+ .toBeLessThan(48)
// Scope to the drawer: the município detail page also has a "Sugestões" region.
const drawer = page.getByRole('dialog', { name: 'Ações rápidas' })
diff --git a/tests/e2e/campaignWizardChrome.e2e.spec.ts b/tests/e2e/campaignWizardChrome.e2e.spec.ts
index dd91c740..0ed867d2 100644
--- a/tests/e2e/campaignWizardChrome.e2e.spec.ts
+++ b/tests/e2e/campaignWizardChrome.e2e.spec.ts
@@ -24,6 +24,7 @@ test.describe('Wizard — header mobile (B75)', () => {
await expect(page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toBeVisible()
await expect(page.getByRole('link', { name: 'Sair da ação' })).toBeVisible()
await expect(page.getByRole('link', { name: /Voltar/ })).toHaveCount(0)
+ await expect(page.getByRole('button', { name: /Voltar/ })).toHaveCount(0)
await page.getByRole('link', { name: 'Sair da ação' }).click()
await page.waitForURL(/\/campanha\/?$/)
@@ -53,9 +54,9 @@ test.describe('Wizard — header mobile (B75)', () => {
await expect(
topBar.getByLabel(new RegExp(`^Município em atualização: ${municipality.name}`, 'i')),
).toBeVisible()
- await expect(page.getByRole('link', { name: /Voltar/ })).toBeVisible()
+ await expect(page.getByRole('button', { name: /Voltar/ })).toBeVisible()
- await page.getByRole('link', { name: /Voltar/ }).click()
+ await page.getByRole('button', { name: /Voltar/ }).click()
await page.waitForURL(/\/campanha\/acoes\/atualizar-votos\/?$/)
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toHaveCount(0)
await expect(page.getByLabel('Buscar município')).toBeVisible()
diff --git a/tests/int/campaignSuggestions.int.spec.ts b/tests/int/campaignSuggestions.int.spec.ts
index a1736edf..023924a5 100644
--- a/tests/int/campaignSuggestions.int.spec.ts
+++ b/tests/int/campaignSuggestions.int.spec.ts
@@ -276,9 +276,10 @@ describe('loadMunicipalitySuggestions (E11)', () => {
// A quiet município cannot be staged — quietness means NO artifact-anchored
// pattern fires — so claim through the allocator until one qualifies
- // (measured: 205 of 435 with zeroed rows).
+ // (measured: 205 of 435 with zeroed rows). Under a full parallel int suite
+ // the first 10 claims can all be "noisy" from other workers — keep trying.
let municipality: Municipality | null = null
- for (let attempt = 0; attempt < 10; attempt += 1) {
+ for (let attempt = 0; attempt < 40; attempt += 1) {
const candidate = await fixtures.getMunicipality()
await normalizeMunicipality(candidate, { priority: 'alta' })
fixtures.touchMunicipality(candidate.id)
@@ -289,7 +290,7 @@ describe('loadMunicipalitySuggestions (E11)', () => {
break
}
}
- if (!municipality) throw new Error('Nenhum município silencioso em 10 alocações.')
+ if (!municipality) throw new Error('Nenhum município silencioso em 40 alocações.')
const author = await fixtures.createCampaignUser('coordinator')
await fixtures.createMunicipalityUpdate({
diff --git a/tests/unit/campaignMobileTopBar.unit.spec.tsx b/tests/unit/campaignMobileTopBar.unit.spec.tsx
index 56d61633..44339faf 100644
--- a/tests/unit/campaignMobileTopBar.unit.spec.tsx
+++ b/tests/unit/campaignMobileTopBar.unit.spec.tsx
@@ -99,7 +99,7 @@ describe('CampaignMobileTopBar', () => {
expect(screen.queryByRole('link', { name: /Voltar/ })).toBeNull()
})
- it('renders wizard continue mode with back link and municipality subtitle', () => {
+ it('renders wizard continue mode with Voltar button (B114)', () => {
renderTopBar({
wizardChrome: {
flowTitle: 'Ajustar votos',
@@ -110,9 +110,8 @@ describe('CampaignMobileTopBar', () => {
},
})
- expect(screen.getByRole('link', { name: /Voltar/ }).getAttribute('href')).toBe(
- '/campanha/acoes/atualizar-votos',
- )
+ expect(screen.getByRole('button', { name: /Voltar/ })).toBeTruthy()
+ expect(screen.queryByRole('link', { name: /Voltar/ })).toBeNull()
expect(screen.getByLabelText('Município em atualização: Cairu').textContent).toBe('Cairu')
expect(screen.getByRole('link', { name: 'Sair da ação' })).toBeTruthy()
})
diff --git a/tests/unit/campaignWizardShell.unit.spec.tsx b/tests/unit/campaignWizardShell.unit.spec.tsx
index 6db2ae13..f69f7a11 100644
--- a/tests/unit/campaignWizardShell.unit.spec.tsx
+++ b/tests/unit/campaignWizardShell.unit.spec.tsx
@@ -46,9 +46,9 @@ describe('CampaignWizardShell', () => {
children: 'Corpo',
})
- expect(screen.getByRole('link', { name: /Voltar/ }).getAttribute('href')).toBe(
- '/campanha/acoes/atualizar-votos',
- )
+ // B114 — Voltar is a button that shares the Android back contract (not a Link).
+ expect(screen.getByRole('button', { name: /Voltar/ })).toBeTruthy()
+ expect(screen.queryByRole('link', { name: /Voltar/ })).toBeNull()
const topBar = document.querySelector(
'[data-slot="campaign-mobile-top-bar"][data-mode="wizard"]',
)
@@ -69,6 +69,7 @@ describe('CampaignWizardShell', () => {
})
expect(screen.getByRole('link', { name: 'Sair da ação' })).toBeTruthy()
+ expect(screen.queryByRole('button', { name: /Voltar/ })).toBeNull()
expect(screen.queryByRole('link', { name: /Voltar/ })).toBeNull()
})
diff --git a/tests/unit/wizardBack.unit.spec.ts b/tests/unit/wizardBack.unit.spec.ts
new file mode 100644
index 00000000..c02eaab5
--- /dev/null
+++ b/tests/unit/wizardBack.unit.spec.ts
@@ -0,0 +1,116 @@
+import { describe, expect, it } from 'vitest'
+
+import { CAMPAIGN_WIZARD_ACTION_SLUGS } from '@/lib/campaignActionRoutes'
+import {
+ isWizardBackHistoryState,
+ isWizardLayerHistoryState,
+ resolveWizardBack,
+ shouldHandleWizardBackPopstate,
+ WIZARD_BACK_HISTORY_KEY,
+ WIZARD_LAYER_HISTORY_KEY,
+ WIZARD_LEADERSHIP_FORM_LAYER,
+ wizardStepPreviousHref,
+} from '@/lib/wizardBack'
+
+const signalSlug = CAMPAIGN_WIZARD_ACTION_SLUGS['register-signal']
+const votesSlug = CAMPAIGN_WIZARD_ACTION_SLUGS['update-votes']
+const trendSlug = CAMPAIGN_WIZARD_ACTION_SLUGS['change-trend']
+const leadershipSlug = CAMPAIGN_WIZARD_ACTION_SLUGS['update-leadership']
+
+describe('wizardBack', () => {
+ it('entry back navigates to dismiss / returnPath', () => {
+ expect(
+ resolveWizardBack({
+ stepKind: 'entry',
+ dismissHref: '/campanha/municipios/cairu',
+ }),
+ ).toEqual({ kind: 'navigate', href: '/campanha/municipios/cairu' })
+ })
+
+ it('continue back navigates to previousHref', () => {
+ expect(
+ resolveWizardBack({
+ stepKind: 'continue',
+ previousHref: `/campanha/acoes/${signalSlug}`,
+ dismissHref: '/campanha',
+ }),
+ ).toEqual({ kind: 'navigate', href: `/campanha/acoes/${signalSlug}` })
+ })
+
+ it('client layer pops the layer instead of navigating', () => {
+ expect(
+ resolveWizardBack({
+ stepKind: 'continue',
+ previousHref: `/campanha/acoes/${leadershipSlug}`,
+ dismissHref: '/campanha',
+ clientLayer: WIZARD_LEADERSHIP_FORM_LAYER,
+ }),
+ ).toEqual({ kind: 'pop-layer', layer: WIZARD_LEADERSHIP_FORM_LAYER })
+ })
+
+ it('canonical previousHrefs keep signal body → type → search coherent', () => {
+ const search = wizardStepPreviousHref({
+ step: 'signal-type',
+ actionSlug: signalSlug,
+ returnPath: '/campanha',
+ })
+ expect(search).toBe(`/campanha/acoes/${signalSlug}?from=%2Fcampanha`)
+
+ const type = wizardStepPreviousHref({
+ step: 'signal-body',
+ actionSlug: signalSlug,
+ municipalitySlug: 'cairu',
+ returnPath: '/campanha',
+ })
+ expect(type).toBe(`/campanha/acoes/${signalSlug}?municipio=cairu&from=%2Fcampanha`)
+
+ expect(
+ wizardStepPreviousHref({
+ step: 'expected-votes',
+ actionSlug: votesSlug,
+ }),
+ ).toBe(`/campanha/acoes/${votesSlug}`)
+ })
+
+ it('trend choice previous is municipality search (not the same URL)', () => {
+ const previous = wizardStepPreviousHref({
+ step: 'trend-choice',
+ actionSlug: trendSlug,
+ municipalitySlug: 'cairu',
+ entryAction: 'update-votes',
+ returnPath: '/campanha/municipios/cairu',
+ })
+ expect(previous).toBe(`/campanha/acoes/${trendSlug}?from=%2Fcampanha%2Fmunicipios%2Fcairu`)
+ expect(previous).not.toContain('municipio=')
+ })
+
+ it('recognizes history marks', () => {
+ expect(isWizardBackHistoryState({ [WIZARD_BACK_HISTORY_KEY]: true })).toBe(true)
+ expect(isWizardBackHistoryState({})).toBe(false)
+ expect(
+ isWizardLayerHistoryState({ [WIZARD_LAYER_HISTORY_KEY]: WIZARD_LEADERSHIP_FORM_LAYER }),
+ ).toBe(true)
+ expect(isWizardLayerHistoryState({ [WIZARD_BACK_HISTORY_KEY]: true })).toBe(false)
+ })
+
+ it('handles popstate only when we pushed and are not closing ourselves', () => {
+ expect(
+ shouldHandleWizardBackPopstate({
+ wasHistoryPushed: true,
+ closingProgrammatically: false,
+ }),
+ ).toBe(true)
+ expect(
+ shouldHandleWizardBackPopstate({
+ wasHistoryPushed: true,
+ closingProgrammatically: true,
+ }),
+ ).toBe(false)
+ expect(
+ shouldHandleWizardBackPopstate({
+ wasHistoryPushed: false,
+ closingProgrammatically: false,
+ }),
+ ).toBe(false)
+ })
+})
diff --git a/tests/unit/wizardNavigationPending.unit.spec.tsx b/tests/unit/wizardNavigationPending.unit.spec.tsx
index 277dc4ae..bba2bdb2 100644
--- a/tests/unit/wizardNavigationPending.unit.spec.tsx
+++ b/tests/unit/wizardNavigationPending.unit.spec.tsx
@@ -3,15 +3,15 @@ import { act } from 'react'
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from 'vitest'
const routerState = vi.hoisted(() => ({
- push: vi.fn(),
- resolvePush: null as (() => void) | null,
+ replace: vi.fn(),
+ resolveReplace: null as (() => void) | null,
}))
vi.mock('next/navigation', async (importActual) => ({
...(await importActual()),
useRouter: () => ({
- push: (...args: unknown[]) => routerState.push(...args),
- replace: vi.fn(),
+ push: vi.fn(),
+ replace: (...args: unknown[]) => routerState.replace(...args),
}),
}))
@@ -21,6 +21,7 @@ import { CampaignMobileTopBar } from '@/components/campaign/shell/CampaignMobile
import { CampaignWizardChromeProvider } from '@/components/campaign/shell/CampaignWizardChromeContext'
import { SidebarProvider } from '@/components/ui/Sidebar'
import { WIZARD_STEP_PENDING_MESSAGE } from '@/lib/campaignWizardCopy'
+import { WIZARD_BACK_HISTORY_KEY } from '@/lib/wizardBack'
import { stubMatchMedia } from '../helpers/matchMedia'
const mountWizardNavigation = () =>
@@ -60,34 +61,53 @@ describe('wizard navigation pending', () => {
afterEach(() => {
cleanup()
- routerState.push.mockReset()
- routerState.resolvePush = null
+ routerState.replace.mockReset()
+ routerState.resolveReplace = null
vi.unstubAllGlobals()
})
- it('dims step content and locks chrome while Voltar navigation is in flight', async () => {
- routerState.push.mockImplementation(
+ it('dims step content and locks chrome while Voltar navigation is in flight (B114)', async () => {
+ routerState.replace.mockImplementation(
() =>
new Promise((resolve) => {
- routerState.resolvePush = resolve
+ routerState.resolveReplace = resolve
}),
)
+ const historyStack: unknown[] = [null]
+ vi.stubGlobal('history', {
+ get state() {
+ return historyStack[historyStack.length - 1] ?? null
+ },
+ pushState(state: unknown) {
+ historyStack.push(state)
+ },
+ back() {
+ historyStack.pop()
+ window.dispatchEvent(new PopStateEvent('popstate', { state: historyStack.at(-1) ?? null }))
+ },
+ })
+
mountWizardNavigation()
+ // Shell pushes a synthetic wizard-back mark on mount.
+ expect(historyStack.at(-1)).toEqual({ [WIZARD_BACK_HISTORY_KEY]: true })
+
const stepBody = screen.getByRole('heading', { level: 1, name: 'Quantos votos?' }).parentElement
expect(stepBody).not.toBeNull()
expect(stepBody!.getAttribute('aria-busy')).not.toBe('true')
expect(stepBody!.getAttribute('data-pending')).toBeNull()
- const backLink = screen.getByRole('link', { name: /Voltar/ })
+ const backButton = screen.getByRole('button', { name: /Voltar/ })
await act(async () => {
- fireEvent.click(backLink)
+ fireEvent.click(backButton)
})
- expect(routerState.push).toHaveBeenCalledWith('/campanha/acoes/atualizar-votos', {
- scroll: true,
+ await waitFor(() => {
+ expect(routerState.replace).toHaveBeenCalledWith('/campanha/acoes/atualizar-votos', {
+ scroll: true,
+ })
})
await waitFor(() => {
@@ -95,13 +115,13 @@ describe('wizard navigation pending', () => {
expect(stepBody!.getAttribute('data-pending')).toBe('true')
})
expect(screen.getByText(WIZARD_STEP_PENDING_MESSAGE)).toBeTruthy()
- expect(backLink.getAttribute('aria-busy')).toBe('true')
+ expect((backButton as HTMLButtonElement).disabled).toBe(true)
await waitFor(() => {
expect(document.querySelector('[data-slot="skeleton"]')).toBeTruthy()
})
await act(async () => {
- routerState.resolvePush?.()
+ routerState.resolveReplace?.()
})
expect(stepBody!.getAttribute('aria-busy')).not.toBe('true')