Skip to content

Commit

Permalink
test: add test to check that flow cleared (#19066)
Browse files Browse the repository at this point in the history
Check that after navigation to
react view flow components are
not left on screen.
  • Loading branch information
caalador committed Apr 2, 2024
1 parent 62059fe commit 85f4a25
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,23 @@ public void testreactNavigationBrowserHistoryBack_anchor() {
$(SpanElement.class).first().getText());
}

@Test
public void testReactNavigation_flowContentCleaned() {
open();

Assert.assertEquals("NavigationView",
$(SpanElement.class).first().getText());

$(AnchorElement.class).id(NavigationView.REACT_ANCHOR_ID).click();
Assert.assertEquals("This is a simple view for a React route",
$(ParagraphElement.class).id("react").getText());

Assert.assertFalse("Flow navigation view contents should not exist",
$(AnchorElement.class)
.attribute("id", NavigationView.REACT_ANCHOR_ID)
.exists());
}

@Test
public void testReactNavigationBrowserHistoryBack_serverNavigation() {
open();
Expand Down

0 comments on commit 85f4a25

Please sign in to comment.