Skip to content

Commit

Permalink
Add waiting to stabilize testHiddenElementsNotDisplayed
Browse files Browse the repository at this point in the history
  • Loading branch information
mialeska committed Oct 16, 2024
1 parent 163314f commit 9bf66d3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tests.integration.elements;

import aquality.selenium.browser.AqualityServices;
import aquality.selenium.core.elements.ElementState;
import aquality.selenium.core.elements.ElementsCount;
import aquality.selenium.elements.interfaces.ILabel;
Expand Down Expand Up @@ -56,7 +57,7 @@ public void testHiddenElementsExist(Function<ElementsCount, List<ILabel>> elemen
public void testHiddenElementsNotDisplayed(Function<ElementsCount, List<ILabel>> elementsListProvider) {
List<ILabel> listElements = elementsListProvider.apply(ElementsCount.MORE_THAN_ZERO);
Assert.assertFalse(listElements.isEmpty());
Assert.assertTrue(listElements.stream().noneMatch(el -> el.state().isDisplayed()));
Assert.assertTrue(AqualityServices.getConditionalWait().waitFor(() -> listElements.stream().noneMatch(el -> el.state().isDisplayed())));
}

@Test
Expand Down

0 comments on commit 9bf66d3

Please sign in to comment.