teqo-backup/tests/e2e
Francisco Ignácio Fontoura Solla c7001b75f0 E14: engagement levels N0-N4 and the first allocationDecision writer.
`municipality.engagementLevel` (staff-only, no default) records what the
campaign decided to invest in a município, next to the E8/E10 metrics that
describe what it knows. Moving it is a reallocation decision, so only
unrestricted staff may, every move carries a rationale plus the signals that
would reverse it, and the write files an `allocationDecision` in the same
transaction under an advisory lock taken before the current level is read —
otherwise the snapshot's `from` is a guess. The enum gains `movimento`: a level
move is neither `aceita` nor `descarta`.

No backfill. Null is "Sem nível", and filtering by it is the triage queue.
That is also why the list sorts `nivel` in memory rather than in the query:
Postgres puts NULLs first on DESC, so a native sort would open "N4 primeiro"
on a page of municípios nobody has decided about yet. The filter stays native.

The hysteresis rules from research §6.8 are pure and client-safe, so the
Popover explains a block before submitting and the server re-runs them anyway;
a blocked move answers 409 with typed violations and the override is recorded
with exactly the rules it contradicted.
2026-07-27 21:19:33 -03:00
..
fixtures C13: renomeia "Plano de Acao" para "Atividade" em toda a vertical /campanha 2026-07-25 20:50:38 -03:00
admin.e2e.spec.ts Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
campaign-pwa.e2e.spec.ts Add installable PWA foundation for the /campanha field app. 2026-07-18 17:28:34 -03:00
campaignActivity.e2e.spec.ts C13: renomeia "Plano de Acao" para "Atividade" em toda a vertical /campanha 2026-07-25 20:50:38 -03:00
campaignAuth.e2e.spec.ts Add remembered campaign sessions 2026-07-27 08:57:26 -03:00
campaignConcepts.e2e.spec.ts Tooling: prettier como autoridade de formatacao (organize-imports deterministico, scripts format/format:check, normalizacao mecanica de 312 arquivos; artefatos gerados e migrations excluidos via .prettierignore) 2026-07-25 17:22:20 -03:00
campaignLeaderships.e2e.spec.ts B32: editar Status de apoio na célula da lista de lideranças 2026-07-27 09:56:09 -03:00
campaignMunicipalities.e2e.spec.ts B42: Drawer quick-edit and a tappable card on the mobile municipalities list. 2026-07-27 20:49:41 -03:00
campaignNearestMunicipality.e2e.spec.ts simplify(B14): corrige o mecanismo da fronteira, estado unsupported e duplicatas 2026-07-26 18:03:44 -03:00
campaignTerritories.e2e.spec.ts B25: link do território na lista de municípios 2026-07-26 18:59:49 -03:00
campaignZoneMap.e2e.spec.ts B8 F2: polígonos das ZE de Salvador e re-keying do coroplético por map key 2026-07-26 23:08:09 -03:00
frontend.e2e.spec.ts Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
setup.e2e.spec.ts E14: engagement levels N0-N4 and the first allocationDecision writer. 2026-07-27 21:19:33 -03:00