Skip to content

Commit

Permalink
#787 - added test showing another issue with streams()
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekradzyminski committed Mar 22, 2019
1 parent 23db6cc commit e12fa8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Expand Up @@ -37,8 +37,6 @@
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.pagefactory.ElementLocator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Map the list to a FluentList in order to offers some events like click(), submit(), value() ...
Expand Down
Expand Up @@ -25,6 +25,8 @@ class WaitComponentsListTest extends IntegrationFluentTest {
@Page
private RowsListPage rowsListPage;

@FindBy(css = ".row")
private FluentList<FluentWebElement> fluentList;

@FindBy(css = ".row")
private FluentList<RowComponent> componentsList;
Expand All @@ -39,7 +41,16 @@ private boolean isSubscribersListContaining(String text) {
}

@Test
void streamListChangeTest() {
void streamListChangTest() {
goTo(ELEMENT_REPLACE_URL);
await().until(() ->
fluentList
.stream()
.anyMatch(el -> el.text().equals(VALUE_OF_REPLACED_ROW)));
}

@Test
void streamListComponentsChangeTest() {
goTo(ELEMENT_REPLACE_URL);
await().until(subscribersListContains(VALUE_OF_REPLACED_ROW));
}
Expand Down

0 comments on commit e12fa8f

Please sign in to comment.