mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
OH14 — register mirror collections in offline executors + fix e2e POST waits
This commit is contained in:
parent
ce8bf67828
commit
ceb1b3a8af
4 changed files with 9 additions and 3 deletions
|
|
@ -129,6 +129,10 @@ const createDomainOfflineExecutor = (): OfflineExecutor =>
|
|||
leadershipCreateOutbox: leadershipCreateOutboxCollection,
|
||||
demandTransitionOutbox: demandTransitionOutboxCollection,
|
||||
activityUpdateOutbox: activityUpdateOutboxCollection,
|
||||
// Mirror rows touched in onMutate must be registered for persistence.
|
||||
leaderships: leadershipsCollection,
|
||||
demands: demandsCollection,
|
||||
activities: activitiesCollection,
|
||||
},
|
||||
storage: new IndexedDBAdapter('teqo-ops-domain', 'outbox'),
|
||||
beforeRetry: collapseAllDomainOutbox,
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ const createMunicipalityOfflineExecutor = (): OfflineExecutor =>
|
|||
politicalTrendOutbox: politicalTrendOutboxCollection,
|
||||
engagementLevelOutbox: engagementLevelOutboxCollection,
|
||||
advisorsOutbox: advisorsOutboxCollection,
|
||||
// Mirror rows touched in onMutate must be registered for persistence.
|
||||
votePledges: votePledgesCollection,
|
||||
},
|
||||
storage: new IndexedDBAdapter('teqo-ops-municipality', 'outbox'),
|
||||
beforeRetry: collapseAllMunicipalityOutbox,
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ test.describe('campaign leaderships list', () => {
|
|||
await expect(statusPopover).toBeVisible()
|
||||
await expect(statusPopover.getByRole('button', { name: 'Salvar' })).toHaveCount(0)
|
||||
|
||||
// Auto-save (150 ms debounce): wait for the actual POST response — the
|
||||
// Auto-save (150 ms debounce): wait for the CAS server action POST — the
|
||||
// badge text updates optimistically before the request even lands, so a
|
||||
// text-only assertion here would race the reload below against a save
|
||||
// that hasn't reached the database yet.
|
||||
await Promise.all([
|
||||
expectPostResponse(page, '/campanha/liderancas/support-status'),
|
||||
expectPostResponse(page, '/campanha/liderancas'),
|
||||
statusPopover.getByLabel('Status de apoio', { exact: true }).selectOption('engajado'),
|
||||
])
|
||||
await expect(page.getByRole('button', { name: 'Editar status de apoio' })).toContainText(
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
await trendPopover.getByLabel('Justificativa').fill(note)
|
||||
await trendPopover.getByLabel('Tendência', { exact: true }).selectOption('favoravel')
|
||||
await Promise.all([
|
||||
expectPostResponse(page, '/campanha/municipios/political-trend'),
|
||||
expectPostResponse(page, '/campanha/municipios'),
|
||||
trendPopover.getByLabel('Justificativa').blur(),
|
||||
])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue