Skip to content

Commit

Permalink
Updated UITests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeTraveler committed Jul 31, 2019
1 parent f18c3b3 commit 2ec750b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Src/HackerNews.UITests/Pages/NewsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public bool IsRefreshActivityIndicatorDisplayed
switch (App)
{
case AndroidApp androidApp:
return (bool)App.Query(x => x.Class("SwipeRefreshLayout").Invoke("isRefreshing")).FirstOrDefault();

return (bool)(App.Query(x => x.Class("SwipeRefreshLayout").Invoke("isRefreshing")).FirstOrDefault() ?? false);
case iOSApp iosApp:
return App.Query(x => x.Class("UIRefreshControl")).Any();

Expand All @@ -33,6 +32,13 @@ public bool IsRefreshActivityIndicatorDisplayed
}
}

public override void WaitForPageToLoad()
{
base.WaitForPageToLoad();

WaitForNoActivityIndicator();
}

public void WaitForNoActivityIndicator(int timeoutInSeconds = 25)
{
int counter = 0;
Expand All @@ -46,13 +52,6 @@ public void WaitForNoActivityIndicator(int timeoutInSeconds = 25)
}
}

public override void WaitForPageToLoad()
{
base.WaitForPageToLoad();

WaitForNoActivityIndicator();
}

public List<StoryModel> GetStoryList()
{
string storyListAsBase64String;
Expand Down

0 comments on commit 2ec750b

Please sign in to comment.