Skip to content

Commit 102116c

Browse files
committed
Dont allways Restart the app
Provide go back button
1 parent 8d99094 commit 102116c

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

UITests/UITests.App/MainTestHost.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
<Grid>
1111
<testhelpers:TestAutomationHelpersPanel />
12+
<Button x:Name="GoBackInvokerButton"
13+
Width="0"
14+
Height="0"
15+
AutomationProperties.AutomationId="__GoBackInvoker"
16+
IsHitTestVisible="False"
17+
IsTabStop="False"
18+
Click="GoBackInvokerButton_Click"
19+
Opacity="0" />
1220

1321
<Frame x:Name="navigationFrame"
1422
Navigated="NavigationFrame_Navigated"

UITests/UITests.App/MainTestHost.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,12 @@ private void NavigationFrame_NavigationFailed(object sender, Windows.UI.Xaml.Nav
114114
Log.Error("Failed to navigate to page {0}", e.SourcePageType.FullName);
115115
_loadingStateTask.SetResult(false);
116116
}
117+
118+
private void GoBackInvokerButton_Click(object sender, RoutedEventArgs e)
119+
{
120+
Log.Comment("Go Back Clicked. Navigating to Page...");
121+
navigationFrame.Navigate(typeof(Page));
122+
Log.Comment("Navigated to Page.");
123+
}
117124
}
118125
}

UITests/UITests.Tests.Shared/UITestBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ public async Task TestInitialize()
179179
public async Task TestCleanup()
180180
{
181181
helper.Dispose();
182-
TestEnvironment.ShouldRestartApplication = true;
183182
TestCleanupHelper.Cleanup();
184183
}
185184

0 commit comments

Comments
 (0)