Skip to content

Commit

Permalink
chore: Test PlatformHelpers for ios not finding navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklimakc committed Oct 4, 2024
1 parent bf72d4d commit 8c1ad2f
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,7 @@ public async Task When_Commerce_Responsive()

/// Tap through each tab bar item

PlatformHelpers.On(
iOS: () =>
{
App.WaitThenTap("DealsTabBarItem");
var title = App.CreateQuery(x => x.WithClass("navigationBar").Descendant("label")).FirstResult();

Assert.AreEqual("Deals", title.Text);
},
Android: async () => await App.TapAndWait("DealsTabBarItem", "DealsNavigationBar"),
Browser: async () => await App.TapAndWait("DealsTabBarItem", "DealsNavigationBar")
);

//await App.TapAndWait("DealsTabBarItem", "DealsNavigationBar");
await App.TapAndWait("DealsTabBarItem", "DealsNavigationBar");

await App.TapAndWait("ProductsTabBarItem", "ProductsNavigationBar");

Expand Down Expand Up @@ -120,8 +108,16 @@ public async Task When_Commerce_Responsive()
await App.TapAndWait("DealsNavigationViewItem", "DealsListView");

await App.SelectElementIndexAndWait("DealsListView", "2", "ProductDetailsNavigationBar");
App.WaitElement("DealsNavigationBar");

PlatformHelpers.On(
iOS: () =>
{
var title = App.CreateQuery(x => x.WithClass("navigationBar").Descendant("label")).FirstResult();
Assert.AreEqual("Deals", title.Text);
},
Android: async () => App.WaitElement("DealsNavigationBar"),
Browser: async () => App.WaitElement("DealsNavigationBar")
);

// Select a product
await App.TapAndWait("ProductsNavigationViewItem", "ProductsListView");
Expand Down

0 comments on commit 8c1ad2f

Please sign in to comment.