From c4b257a0f0b089e3ab1c4b8659f5beb58970ecea Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Tue, 6 Aug 2019 13:21:07 +0100 Subject: [PATCH] fix(tests): no async forEach in merge patients Removed the forEach() async function that caused spurious test timeouts. It's now a for...of loop. --- test/end-to-end/patient/registry.merge.page.js | 6 +++--- test/end-to-end/patient/registry.merge.spec.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/end-to-end/patient/registry.merge.page.js b/test/end-to-end/patient/registry.merge.page.js index be50c021c6..38c595d3e6 100644 --- a/test/end-to-end/patient/registry.merge.page.js +++ b/test/end-to-end/patient/registry.merge.page.js @@ -15,9 +15,9 @@ function PatientMergePage() { }; page.gridSelectRows = async function gridSelectRows(...lines) { - lines.forEach(async element => { - await GU.selectRow(gridId, element); - }); + for (const line of lines) { // eslint-disable-line + await GU.selectRow(gridId, line); // eslint-disable-line + } }; page.selectPatientToKeep = async function selectPatientToKeep(reference) { diff --git a/test/end-to-end/patient/registry.merge.spec.js b/test/end-to-end/patient/registry.merge.spec.js index 5015d845db..ba753b0012 100644 --- a/test/end-to-end/patient/registry.merge.spec.js +++ b/test/end-to-end/patient/registry.merge.spec.js @@ -25,5 +25,4 @@ describe('Merge Patients', () => { await Page.merge(); await components.notification.hasSuccess(); }); - });