Skip to content

Commit

Permalink
chore(#8412): stabilize death reporting e2e test
Browse files Browse the repository at this point in the history
Wait for sentinel when transitions need to run before testing page content.
  • Loading branch information
dianabarsan authored Jul 31, 2023
1 parent b8519be commit bed223c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/default/enketo/death-report.wdio-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const reportsPage = require('@page-objects/default/reports/reports.wdio.page');
const analyticsPage = require('@page-objects/default/analytics/analytics.wdio.page');
const genericForm = require('@page-objects/default/enketo/generic-form.wdio.page');
const deathReportForm = require('@page-objects/default/enketo/death-report.page');
const sentinelUtils = require('@utils/sentinel');

describe('Submit a death report', () => {
const places = placeFactory.generateHierarchy();
Expand Down Expand Up @@ -40,8 +41,9 @@ describe('Submit a death report', () => {
expect(summaryDetails.deathInformation).to.equal(deathNote);

await genericForm.submitForm();
await commonPage.waitForPageLoaded();
await commonPage.sync(true);
await commonPage.sync();
await sentinelUtils.waitForSentinel();
await commonPage.sync();

expect(await contactPage.getContactDeceasedStatus()).to.equal('Deceased');
expect(await (await contactPage.deathCard()).isDisplayed()).to.be.true;
Expand Down

0 comments on commit bed223c

Please sign in to comment.