-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing AutoSuggestBox list for April 2018 Update and earlier OS versi…
…ons (#1116) During our consolidation of templates, a couple parts from the AutoSuggestBox's template from the April 2018 Update and earlier versions was mistakenly removed, which broke the ASB's list display. I've put those components back specifically for those OS versions, and have added a regression test to ensure this doesn't regress in the future.
- Loading branch information
Showing
8 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
dev/AutoSuggestBox/InteractionTests/AutoSuggestBoxTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using System; | ||
|
||
using Common; | ||
using Windows.UI.Xaml.Tests.MUXControls.InteractionTests.Infra; | ||
using Windows.UI.Xaml.Tests.MUXControls.InteractionTests.Common; | ||
|
||
#if USING_TAEF | ||
using WEX.TestExecution; | ||
using WEX.TestExecution.Markup; | ||
using WEX.Logging.Interop; | ||
#else | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting.Logging; | ||
#endif | ||
|
||
using Microsoft.Windows.Apps.Test.Foundation.Controls; | ||
using Microsoft.Windows.Apps.Test.Foundation.Patterns; | ||
|
||
namespace Windows.UI.Xaml.Tests.MUXControls.InteractionTests | ||
{ | ||
[TestClass] | ||
public class AutoSuggestBox | ||
{ | ||
[ClassInitialize] | ||
[TestProperty("RunAs", "User")] | ||
[TestProperty("Classification", "Integration")] | ||
[TestProperty("TestPass:IncludeOnlyOn", "Desktop")] | ||
public static void ClassInitialize(TestContext testContext) | ||
{ | ||
TestEnvironment.Initialize(testContext); | ||
} | ||
|
||
[TestCleanup] | ||
public void TestCleanup() | ||
{ | ||
TestCleanupHelper.Cleanup(); | ||
} | ||
|
||
[TestMethod] | ||
public void CanSelectSuggestion() | ||
{ | ||
using (var setup = new TestSetupHelper("AutoSuggestBox Tests")) | ||
{ | ||
Edit autoSuggestBoxTextBox = new Edit(FindElement.ByNameAndClassName("With suggestions", "TextBox")); | ||
FocusHelper.SetFocus(autoSuggestBoxTextBox); | ||
KeyboardHelper.EnterText(autoSuggestBoxTextBox, "test"); | ||
KeyboardHelper.PressKey(Key.Enter); | ||
InvokeImplementation dolorItem = new InvokeImplementation(FindElement.ByNameAndClassName("dolor", "ListViewItem")); | ||
|
||
using (ValueChangedEventWaiter waiter = new ValueChangedEventWaiter(autoSuggestBoxTextBox, "dolor")) | ||
{ | ||
dolorItem.Invoke(); | ||
} | ||
|
||
Verify.AreEqual("dolor", autoSuggestBoxTextBox.Value); | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
dev/AutoSuggestBox/InteractionTests/AutoSuggestBox_InteractionTests.projitems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. --> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
<HasSharedItems>true</HasSharedItems> | ||
<SharedGUID>afaad014-132c-4d2a-a28e-4ef717d3e647</SharedGUID> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Configuration"> | ||
<Import_RootNamespace>AutoSuggestBox_InteractionTests</Import_RootNamespace> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildThisFileDirectory)AutoSuggestBoxTests.cs" /> | ||
</ItemGroup> | ||
</Project> |
14 changes: 14 additions & 0 deletions
14
dev/AutoSuggestBox/InteractionTests/AutoSuggestBox_InteractionTests.shproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. --> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{ED3E2182-D259-4DC0-B7BB-9B4219762F4C}</ProjectGuid> | ||
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
<PropertyGroup /> | ||
<Import Project="AutoSuggestBox_InteractionTests.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters