Skip to content

Commit

Permalink
chore: Add UI tests for ToDo ContentControl navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklimakc committed Jul 19, 2024
1 parent d4ff5eb commit 456909e
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,53 @@ public async Task When_ToDo_Responsive()

}

[Test]
public async Task When_ToDo_Wide_Nav_ContentControl()
{
InitTestSection(TestSections.Apps_ToDo);

App.WaitThenTap("ShowAppButton");

// Make sure the app has loaded
App.WaitElement("WelcomeNavigationBar");

// Login
await App.TapAndWait("LoginButton", "HomeNavigationBar");

// Select a task list
await App.TapAndWait("SelectTaskList2Button", "TaskListNavigationBar");

await App.TapAndWait("SelectActiveTask1Button", "TaskNavigationBar");

var screenBefore = TakeScreenshot("When_ToDo_Wide_Nav_ContentControl_Before");

await App.TapAndWait("DetailsBackButton", "TaskListNavigationBar");

var screenAfter = TakeScreenshot("When_ToDo_Wide_Nav_ContentControl_After");

ImageAssert.AreEqual(screenBefore, screenAfter, tolerance: PixelTolerance.Exclusive(Constants.DefaultPixelTolerance));
}

[Test]
public async Task When_ToDo_Narrow_Nav_ContentControl()
{
InitTestSection(TestSections.Apps_ToDo);

App.WaitThenTap("ShowAppButton");

App.WaitThenTap("NarrowButton");

// Make sure the app has loaded
App.WaitElement("WelcomeNavigationBar");

// Login
await App.TapAndWait("LoginButton", "HomeNavigationBar");

// Select a task list
await App.TapAndWait("SelectTaskList2Button", "TaskListNavigationBar");

await App.TapAndWait("SelectActiveTask1Button", "TaskNavigationBar");

await App.TapAndWait("DetailsBackButton", "TaskListNavigationBar");
}
}

0 comments on commit 456909e

Please sign in to comment.