From 9c039186ab8f25a8f867cd0d6feb398d0b131166 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 17 Nov 2023 15:10:59 +1100 Subject: [PATCH] Added waitFor on document name in functional test #3034 --- .../groovy/au/org/ala/fieldcapture/ProjectIndexSpec.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/integration-test/groovy/au/org/ala/fieldcapture/ProjectIndexSpec.groovy b/src/integration-test/groovy/au/org/ala/fieldcapture/ProjectIndexSpec.groovy index 47b9d1e3d..13bb608cc 100644 --- a/src/integration-test/groovy/au/org/ala/fieldcapture/ProjectIndexSpec.groovy +++ b/src/integration-test/groovy/au/org/ala/fieldcapture/ProjectIndexSpec.groovy @@ -62,9 +62,10 @@ class ProjectIndexSpec extends StubbedCasSpec { waitFor 10, {hasBeenReloaded()} at ProjectIndex // Do another at check or the next call to "hasBeenReloaded" will return regardless of whether the page has been reloaded again. - waitFor {admin.documents.documentSummaryList().size() == 2} - admin.documents.documentSummaryList().size() == 2 - admin.documents.documentSummaryList()[1].name == 'test 2' + waitFor { + admin.documents.documentSummaryList().size() == 2 + admin.documents.documentSummaryList()[1].name == 'test 2' + } when: admin.documents.documentSummaryList()[1].deleteButton.click()