Skip to content

Commit 6954c05

Browse files
committed
Added ConstrainedBox
1 parent e2ee28d commit 6954c05

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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 Microsoft.Windows.Apps.Test.Automation;
6+
using Microsoft.Windows.Apps.Test.Foundation;
7+
using Microsoft.Windows.Apps.Test.Foundation.Controls;
8+
using Windows.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
9+
using Windows.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
10+
11+
#if USING_TAEF
12+
using WEX.Logging.Interop;
13+
using WEX.TestExecution;
14+
using WEX.TestExecution.Markup;
15+
#else
16+
using Microsoft.VisualStudio.TestTools.UnitTesting;
17+
#endif
18+
19+
namespace UITests.Tests
20+
{
21+
[TestClass]
22+
public class ConstrainedBoxTest : UITestBase
23+
{
24+
[ClassInitialize]
25+
[TestProperty("RunAs", "User")]
26+
[TestProperty("Classification", "ScenarioTestSuite")]
27+
[TestProperty("Platform", "Any")]
28+
public static void ClassInitialize(TestContext testContext)
29+
{
30+
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
31+
}
32+
33+
[TestMethod]
34+
[TestPage("ConstrainedBoxTestPage")]
35+
public void SimpleTestMethod()
36+
{
37+
//ConstrainedBox cb;
38+
//var button = new Button(FindElement.ByName("Click Me"));
39+
//var textBlock = new TextBlock(FindElement.ById("textBlock"));
40+
41+
//Verify.IsNotNull(button);
42+
43+
//Verify.AreEqual(string.Empty, textBlock.GetText());
44+
45+
//button.Click();
46+
47+
//Wait.ForIdle();
48+
49+
//Verify.AreEqual("Clicked", textBlock.GetText());
50+
}
51+
}
52+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Page x:Class="UITests.App.Pages.ConstrainedBoxTestPage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
7+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
8+
mc:Ignorable="d">
9+
<Grid>
10+
<controls:ConstrainedBox />
11+
</Grid>
12+
13+
14+
<!--<controls:ConstrainedBox />-->
15+
</Page>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 System.Collections.Generic;
6+
using Microsoft.Toolkit.Uwp.UI.Controls;
7+
using Windows.UI.Xaml.Controls;
8+
9+
namespace UITests.App.Pages
10+
{
11+
public sealed partial class ConstrainedBoxTestPage : Page
12+
{
13+
public ConstrainedBoxTestPage()
14+
{
15+
this.InitializeComponent();
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)