mirror of
https://github.com/fsolla/teqo.git
synced 2026-12-02 05:03:05 +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,
|
leadershipCreateOutbox: leadershipCreateOutboxCollection,
|
||||||
demandTransitionOutbox: demandTransitionOutboxCollection,
|
demandTransitionOutbox: demandTransitionOutboxCollection,
|
||||||
activityUpdateOutbox: activityUpdateOutboxCollection,
|
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'),
|
storage: new IndexedDBAdapter('teqo-ops-domain', 'outbox'),
|
||||||
beforeRetry: collapseAllDomainOutbox,
|
beforeRetry: collapseAllDomainOutbox,
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,8 @@ const createMunicipalityOfflineExecutor = (): OfflineExecutor =>
|
||||||
politicalTrendOutbox: politicalTrendOutboxCollection,
|
politicalTrendOutbox: politicalTrendOutboxCollection,
|
||||||
engagementLevelOutbox: engagementLevelOutboxCollection,
|
engagementLevelOutbox: engagementLevelOutboxCollection,
|
||||||
advisorsOutbox: advisorsOutboxCollection,
|
advisorsOutbox: advisorsOutboxCollection,
|
||||||
|
// Mirror rows touched in onMutate must be registered for persistence.
|
||||||
|
votePledges: votePledgesCollection,
|
||||||
},
|
},
|
||||||
storage: new IndexedDBAdapter('teqo-ops-municipality', 'outbox'),
|
storage: new IndexedDBAdapter('teqo-ops-municipality', 'outbox'),
|
||||||
beforeRetry: collapseAllMunicipalityOutbox,
|
beforeRetry: collapseAllMunicipalityOutbox,
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ test.describe('campaign leaderships list', () => {
|
||||||
await expect(statusPopover).toBeVisible()
|
await expect(statusPopover).toBeVisible()
|
||||||
await expect(statusPopover.getByRole('button', { name: 'Salvar' })).toHaveCount(0)
|
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
|
// badge text updates optimistically before the request even lands, so a
|
||||||
// text-only assertion here would race the reload below against a save
|
// text-only assertion here would race the reload below against a save
|
||||||
// that hasn't reached the database yet.
|
// that hasn't reached the database yet.
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
expectPostResponse(page, '/campanha/liderancas/support-status'),
|
expectPostResponse(page, '/campanha/liderancas'),
|
||||||
statusPopover.getByLabel('Status de apoio', { exact: true }).selectOption('engajado'),
|
statusPopover.getByLabel('Status de apoio', { exact: true }).selectOption('engajado'),
|
||||||
])
|
])
|
||||||
await expect(page.getByRole('button', { name: 'Editar status de apoio' })).toContainText(
|
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('Justificativa').fill(note)
|
||||||
await trendPopover.getByLabel('Tendência', { exact: true }).selectOption('favoravel')
|
await trendPopover.getByLabel('Tendência', { exact: true }).selectOption('favoravel')
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
expectPostResponse(page, '/campanha/municipios/political-trend'),
|
expectPostResponse(page, '/campanha/municipios'),
|
||||||
trendPopover.getByLabel('Justificativa').blur(),
|
trendPopover.getByLabel('Justificativa').blur(),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue