From bed223c309579215e422b8975e9641d4bbe78abd Mon Sep 17 00:00:00 2001 From: Diana Barsan <35681649+dianabarsan@users.noreply.github.com> Date: Mon, 31 Jul 2023 07:50:13 +0300 Subject: [PATCH] chore(#8412): stabilize death reporting e2e test Wait for sentinel when transitions need to run before testing page content. --- tests/e2e/default/enketo/death-report.wdio-spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/default/enketo/death-report.wdio-spec.js b/tests/e2e/default/enketo/death-report.wdio-spec.js index f99101f701f..6b3c1ee7c7d 100644 --- a/tests/e2e/default/enketo/death-report.wdio-spec.js +++ b/tests/e2e/default/enketo/death-report.wdio-spec.js @@ -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(); @@ -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;