]> source.dussan.org Git - sonarqube.git/commitdiff
make BackgroundTasksTest more stable
authorStas Vilchik <vilchiks@gmail.com>
Thu, 25 Aug 2016 13:18:22 +0000 (15:18 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 25 Aug 2016 13:18:31 +0000 (15:18 +0200)
it/it-tests/src/test/java/it/projectAdministration/BackgroundTasksTest.java

index a27df0b50158b6b2ef2a6d47ebada26e6b5645e1..46ad5307f855490800bf008d48e11d386704c1d2 100644 (file)
@@ -32,6 +32,7 @@ import pageobjects.BackgroundTasksPage;
 import pageobjects.Navigation;
 import util.selenium.SeleneseTest;
 
+import static com.codeborne.selenide.CollectionCondition.sizeGreaterThan;
 import static util.ItUtils.projectDir;
 
 public class BackgroundTasksTest {
@@ -61,6 +62,7 @@ public class BackgroundTasksTest {
     nav.logIn().submitCredentials("admin", "admin");
     BackgroundTasksPage page = nav.openBackgroundTasksPage();
 
+    page.getTasks().shouldHave(sizeGreaterThan(0));
     BackgroundTaskItem task = page.getTasksAsItems().get(0);
     task.openActions()
       .openScannerContext()
@@ -75,6 +77,7 @@ public class BackgroundTasksTest {
     nav.logIn().submitCredentials("admin", "admin");
     BackgroundTasksPage page = nav.openBackgroundTasksPage();
 
+    page.getTasks().shouldHave(sizeGreaterThan(0));
     BackgroundTaskItem task = page.getTasksAsItems().get(0);
     task.openActions()
       .openErrorStacktrace()