Skip to content

Commit

Permalink
Stabilize ignored tests to fix #62
Browse files Browse the repository at this point in the history
  • Loading branch information
mialeska committed Jun 24, 2020
1 parent a8e1ecb commit de08a8e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ private void AssertStateConditionAfterReopen(Func<IElementStateProvider, bool> s
var testElement = new Label(ContentLoc, "Example", ElementState.ExistsInAnyState);
testElement.State.WaitForClickable();
AqualityServices.Application.Quit();
StartLoading();
ConditionalWait.WaitForTrue(() => testElement.Cache.IsStale, message: "Element should be stale after page is closed.");
OpenDynamicContent();
ConditionalWait.WaitForTrue(() => testElement.Cache.IsStale, message: "Element should be stale after page is reopened.");
AqualityServices.Application.Driver.Navigate().Refresh();
Assert.IsTrue(testElement.Cache.IsStale, "Element should remain stale after the page refresh.");
Assert.AreEqual(expectedValue, stateCondition(testElement.State),
"Element state condition is not expected after refreshing the window");
"Element state condition is not expected after reopening the window");
}

[TearDown]
Expand Down

0 comments on commit de08a8e

Please sign in to comment.