mirror of
https://github.com/fsolla/teqo.git
synced 2026-12-02 13:13:06 +00:00
B114: format + map wizard back paths in e2e affected manifest
Prettier on plan/wizardBack; wake campaignWizardChrome for shell/history.
This commit is contained in:
parent
e880299170
commit
ba157a1475
4 changed files with 17 additions and 21 deletions
|
|
@ -56,17 +56,17 @@ Dados: N/A — navegação.
|
||||||
|
|
||||||
### Investigação (Fase 1 — 2026-08-01)
|
### Investigação (Fase 1 — 2026-08-01)
|
||||||
|
|
||||||
| Superfície | Header Voltar (`previousHref`) | Android back (history) | Problema | Fix B114 |
|
| Superfície | Header Voltar (`previousHref`) | Android back (history) | Problema | Fix B114 |
|
||||||
| --- | --- | --- | --- | --- |
|
| ------------------------- | -------------------------------------- | ------------------------------------------- | ----------------------------------- | -------------------------------------------- |
|
||||||
| Entry busca município | (sem Voltar; X = dismiss/`returnPath`) | URL anterior à entrada | Android ≠ X se veio de deep link | pushState + pop → dismissHref |
|
| Entry busca município | (sem Voltar; X = dismiss/`returnPath`) | URL anterior à entrada | Android ≠ X se veio de deep link | pushState + pop → dismissHref |
|
||||||
| Passo tipo sinal | busca **sem** município ✓ | stack real (pode divergir se replace/chain) | header Link **push** poluía stack | contrato + `history.back` → replace canônico |
|
| Passo tipo sinal | busca **sem** município ✓ | stack real (pode divergir se replace/chain) | header Link **push** poluía stack | contrato + `history.back` → replace canônico |
|
||||||
| Body sinal | tipo (c/ município) ✓ | idem | idem | mapa `wizardStepPreviousHref` |
|
| Body sinal | tipo (c/ município) ✓ | idem | idem | mapa `wizardStepPreviousHref` |
|
||||||
| Tendência choice | **mesmo URL** (c/ município) ✗ | stack | Voltar no-op / refresh | previous → busca sem município |
|
| Tendência choice | **mesmo URL** (c/ município) ✗ | stack | Voltar no-op / refresh | previous → busca sem município |
|
||||||
| Tendência note | choice ✓ | idem | push vs back | contrato |
|
| Tendência note | choice ✓ | idem | push vs back | contrato |
|
||||||
| Votos | busca sem município ✓ | idem | push vs back | contrato |
|
| Votos | busca sem município ✓ | idem | push vs back | contrato |
|
||||||
| Liderança **grid** | busca sem município ✓ | idem | push vs back | contrato |
|
| Liderança **grid** | busca sem município ✓ | idem | push vs back | contrato |
|
||||||
| Liderança **form** | mesmo href do grid ✗ | página/ação anterior | form não é URL — back abandona grid | `pushState` layer → pop → grid |
|
| Liderança **form** | mesmo href do grid ✗ | página/ação anterior | form não é URL — back abandona grid | `pushState` layer → pop → grid |
|
||||||
| Encadeados + `returnPath` | misturam chain | stack real | “ações aleatórias” | alvo canônico por passo + intercept |
|
| Encadeados + `returnPath` | misturam chain | stack real | “ações aleatórias” | alvo canônico por passo + intercept |
|
||||||
|
|
||||||
Chrome pré-B114: `CampaignMobileTopBar` só fazia `CampaignWizardNavLink` → `previousHref`. **Não havia** interceptor `popstate` no wizard (só no Início search, B106).
|
Chrome pré-B114: `CampaignMobileTopBar` só fazia `CampaignWizardNavLink` → `previousHref`. **Não havia** interceptor `popstate` no wizard (só no Início search, B106).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,10 @@ export const E2E_AFFECTED_MANIFEST = [
|
||||||
'src/lib/campaignQuickAction',
|
'src/lib/campaignQuickAction',
|
||||||
'src/lib/campaignReferenceQuickActions',
|
'src/lib/campaignReferenceQuickActions',
|
||||||
'src/lib/campaignPaths.ts',
|
'src/lib/campaignPaths.ts',
|
||||||
|
'src/lib/wizardBack',
|
||||||
|
'src/components/campaign/shared/CampaignWizard',
|
||||||
|
'src/components/campaign/shared/Wizard',
|
||||||
|
'src/components/campaign/shared/useWizardBackHistory',
|
||||||
],
|
],
|
||||||
specs: ['campaign-pwa', 'campaignWizardChrome', 'campaignMunicipalities'],
|
specs: ['campaign-pwa', 'campaignWizardChrome', 'campaignMunicipalities'],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -82,13 +82,7 @@ export const wizardStepPreviousHref = (input: WizardStepPreviousHrefInput): stri
|
||||||
case 'leadership-grid':
|
case 'leadership-grid':
|
||||||
return wizardActionHref(actionSlug, undefined, { returnPath })
|
return wizardActionHref(actionSlug, undefined, { returnPath })
|
||||||
case 'signal-body':
|
case 'signal-body':
|
||||||
return wizardSignalHref(
|
return wizardSignalHref(actionSlug, municipalitySlug, undefined, entryAction, returnPath)
|
||||||
actionSlug,
|
|
||||||
municipalitySlug,
|
|
||||||
undefined,
|
|
||||||
entryAction,
|
|
||||||
returnPath,
|
|
||||||
)
|
|
||||||
case 'trend-note':
|
case 'trend-note':
|
||||||
return wizardTrendHref(
|
return wizardTrendHref(
|
||||||
actionSlug,
|
actionSlug,
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,7 @@ describe('wizardBack', () => {
|
||||||
entryAction: 'update-votes',
|
entryAction: 'update-votes',
|
||||||
returnPath: '/campanha/municipios/cairu',
|
returnPath: '/campanha/municipios/cairu',
|
||||||
})
|
})
|
||||||
expect(previous).toBe(
|
expect(previous).toBe(`/campanha/acoes/${trendSlug}?from=%2Fcampanha%2Fmunicipios%2Fcairu`)
|
||||||
`/campanha/acoes/${trendSlug}?from=%2Fcampanha%2Fmunicipios%2Fcairu`,
|
|
||||||
)
|
|
||||||
expect(previous).not.toContain('municipio=')
|
expect(previous).not.toContain('municipio=')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue