Skip to content

Commit 3012a7f

Browse files
committed
Use HomePage test go back.
1 parent 102116c commit 3012a7f

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed

UITests/UITests.App/HomePage.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Page x:Class="UITests.App.HomePage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
5+
<TextBlock HorizontalAlignment="Center"
6+
VerticalAlignment="Center"
7+
Text="No test loaded." />
8+
</Page>

UITests/UITests.App/HomePage.xaml.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Windows.UI.Xaml.Controls;
6+
7+
namespace UITests.App
8+
{
9+
/// <summary>
10+
/// An empty page that can be used on its own or navigated to within a Frame.
11+
/// </summary>
12+
public sealed partial class HomePage
13+
{
14+
public HomePage()
15+
{
16+
this.InitializeComponent();
17+
}
18+
}
19+
}

UITests/UITests.App/MainTestHost.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
Opacity="0" />
2020

2121
<Frame x:Name="navigationFrame"
22+
IsNavigationStackEnabled="False"
2223
Navigated="NavigationFrame_Navigated"
2324
NavigationFailed="NavigationFrame_NavigationFailed" />
2425
</Grid>

UITests/UITests.App/MainTestHost.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private void NavigationFrame_NavigationFailed(object sender, Windows.UI.Xaml.Nav
118118
private void GoBackInvokerButton_Click(object sender, RoutedEventArgs e)
119119
{
120120
Log.Comment("Go Back Clicked. Navigating to Page...");
121-
navigationFrame.Navigate(typeof(Page));
121+
navigationFrame.Navigate(typeof(HomePage));
122122
Log.Comment("Navigated to Page.");
123123
}
124124
}

UITests/UITests.App/UITests.App.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131
<Compile Include="App.AppService.xaml.cs">
132132
<DependentUpon>App.xaml</DependentUpon>
133133
</Compile>
134+
<Compile Include="HomePage.xaml.cs">
135+
<DependentUpon>HomePage.xaml</DependentUpon>
136+
</Compile>
134137
<Compile Include="MainTestHost.xaml.cs">
135138
<DependentUpon>MainTestHost.xaml</DependentUpon>
136139
</Compile>
@@ -158,6 +161,10 @@
158161
<Generator>MSBuild:Compile</Generator>
159162
<SubType>Designer</SubType>
160163
</ApplicationDefinition>
164+
<Page Include="HomePage.xaml">
165+
<SubType>Designer</SubType>
166+
<Generator>MSBuild:Compile</Generator>
167+
</Page>
161168
<Page Include="MainTestHost.xaml">
162169
<Generator>MSBuild:Compile</Generator>
163170
<SubType>Designer</SubType>

0 commit comments

Comments
 (0)