From 6af1a10df62d2849fcb495a1423db2dc59978812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20G=C3=B3mez?= Date: Tue, 7 Mar 2017 15:37:31 -0800 Subject: [PATCH] Fixed a bug in AutomationSearchCondition.Satisfies() when all the provided OrConditions are false Tests are included to ensure the fix is correct --- .../AutomationSearchConditionTests.cs | 155 ++++++++++++++++++ .../TestStack.White.UITests.csproj | 1 + .../AutomationSearchCondition.cs | 10 +- 3 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 src/TestStack.White.UITests/AutomationElementSearch/AutomationSearchConditionTests.cs diff --git a/src/TestStack.White.UITests/AutomationElementSearch/AutomationSearchConditionTests.cs b/src/TestStack.White.UITests/AutomationElementSearch/AutomationSearchConditionTests.cs new file mode 100644 index 00000000..3f05651d --- /dev/null +++ b/src/TestStack.White.UITests/AutomationElementSearch/AutomationSearchConditionTests.cs @@ -0,0 +1,155 @@ +using NUnit.Framework; +using System.Windows.Automation; +using TestStack.White.AutomationElementSearch; +using TestStack.White.UIItems; +using TestStack.White.UIItems.ListBoxItems; + +namespace TestStack.White.UITests.AutomationElementSearch +{ + [TestFixture(WindowsFramework.WinForms)] + [TestFixture(WindowsFramework.Wpf)] + public class AutomationSearchConditionTests : WhiteUITestBase + { + public AutomationSearchConditionTests(WindowsFramework framework) + : base(framework) + { + } + + [Test] + public void BothOrConditionsAreFalseTest() + { + var button = MainWindow.Get