Skip to content

Commit 2ec750b

Browse files
Updated UITests
1 parent f18c3b3 commit 2ec750b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Src/HackerNews.UITests/Pages/NewsPage.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public bool IsRefreshActivityIndicatorDisplayed
2222
switch (App)
2323
{
2424
case AndroidApp androidApp:
25-
return (bool)App.Query(x => x.Class("SwipeRefreshLayout").Invoke("isRefreshing")).FirstOrDefault();
26-
25+
return (bool)(App.Query(x => x.Class("SwipeRefreshLayout").Invoke("isRefreshing")).FirstOrDefault() ?? false);
2726
case iOSApp iosApp:
2827
return App.Query(x => x.Class("UIRefreshControl")).Any();
2928

@@ -33,6 +32,13 @@ public bool IsRefreshActivityIndicatorDisplayed
3332
}
3433
}
3534

35+
public override void WaitForPageToLoad()
36+
{
37+
base.WaitForPageToLoad();
38+
39+
WaitForNoActivityIndicator();
40+
}
41+
3642
public void WaitForNoActivityIndicator(int timeoutInSeconds = 25)
3743
{
3844
int counter = 0;
@@ -46,13 +52,6 @@ public void WaitForNoActivityIndicator(int timeoutInSeconds = 25)
4652
}
4753
}
4854

49-
public override void WaitForPageToLoad()
50-
{
51-
base.WaitForPageToLoad();
52-
53-
WaitForNoActivityIndicator();
54-
}
55-
5655
public List<StoryModel> GetStoryList()
5756
{
5857
string storyListAsBase64String;

0 commit comments

Comments
 (0)