Permalink
Browse files

UI Test fixes

  • Loading branch information...
1 parent 4f575fd commit 1319cf176c2392ea68b538c32d1612ef55ee4e0c @JakeGinnivan JakeGinnivan committed Apr 9, 2013
@@ -19,8 +19,7 @@ public void EditorContinuesUnorderedList()
editor.PressKey(KeyboardInput.SpecialKeys.RETURN);
editor.TypeText("Continued");
- const string listContinued = @" - List
- - Continued";
+ const string listContinued = " - List\r\n - Continued";
Assert.Equal(listContinued, editor.MarkdownText);
}
@@ -35,8 +34,7 @@ public void EditorContinuesOrderedListWithAllOnes()
editor.PressKey(KeyboardInput.SpecialKeys.RETURN);
editor.TypeText("Continued");
- const string listContinued = @"1. List
-1. Continued";
+ const string listContinued = "1. List\r\n1. Continued";
Assert.Equal(listContinued, editor.MarkdownText);
}
@@ -47,15 +45,12 @@ public void EditorContinuesOrderedListWithNumberedList()
var document = MainWindow.NewDocument();
var editor = document.Editor();
- editor.MarkdownText = @"1. List
-2. Continued";
+ editor.MarkdownText = "1. List\r\n2. Continued";
editor.MoveCursorToEndOfEditor();
editor.PressKey(KeyboardInput.SpecialKeys.RETURN);
editor.TypeText("With count");
- const string listContinued = @"1. List
-2. Continued
-3. With count";
+ const string listContinued = "1. List\r\n2. Continued\r\n3. With count";
Assert.Equal(listContinued, editor.MarkdownText);
}
@@ -74,8 +69,7 @@ public void TabIndentsListWithSpaces()
editor.PressKey(KeyboardInput.SpecialKeys.TAB);
editor.TypeText("Continued");
- const string listContinued = @"1. List
- 1. Continued";
+ const string listContinued = "1. List\r\n 1. Continued";
Assert.Equal(listContinued, editor.MarkdownText);
}
@@ -95,8 +89,7 @@ public void TabIndentsListWithTabs()
editor.PressKey(KeyboardInput.SpecialKeys.TAB);
editor.TypeText("Continued");
- const string listContinued = @"1. List
- 1. Continued";
+ const string listContinued = "1. List\r\n\t1. Continued";
Assert.Equal(listContinued, editor.MarkdownText);
}
@@ -1,6 +1,7 @@
using System.Threading;
using System.Windows.Automation;
using White.Core.UIItems;
+using White.Core.Utility;
using White.Core.WindowsAPI;
namespace Markpad.UITests.Infrastructure
@@ -34,12 +35,12 @@ public void TypeText(string list)
EditorUIItem.Focus();
ParentScreen.WhiteWindow.Keyboard.Enter(list);
+ Retry.ForDefault(() => MarkdownText, s => !s.Contains(list));
}
public void PressKey(KeyboardInput.SpecialKeys @return)
{
ParentScreen.WhiteWindow.Keyboard.PressSpecialKey(@return);
- Thread.Sleep(50);
}
public void MoveCursorToEndOfEditor()
@@ -34,9 +34,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Core, Version=3.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Castle.Core.3.1.0\lib\net40-client\Castle.Core.dll</HintPath>
+ <HintPath>..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\packages\log4net.2.0.0\lib\net40-full\log4net.dll</HintPath>
@@ -51,9 +51,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="TestStack.White, Version=9.2.0.11, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=x86">
+ <Reference Include="TestStack.White, Version=0.10.2.112, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\TestStack.White.9.2.0.11\lib\net40\TestStack.White.dll</HintPath>
+ <HintPath>..\packages\TestStack.White.0.10.2.112\lib\net40\TestStack.White.dll</HintPath>
</Reference>
<Reference Include="UIAutomationClient" />
<Reference Include="UIAutomationTypes" />
@@ -102,4 +102,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Castle.Core" version="3.1.0" targetFramework="net40" />
+ <package id="Castle.Core" version="3.2.0" targetFramework="net40" />
<package id="log4net" version="2.0.0" targetFramework="net45" />
- <package id="TestStack.White" version="9.2.0.11" targetFramework="net40" />
+ <package id="TestStack.White" version="0.10.2.112" targetFramework="net40" />
<package id="xunit" version="1.9.1" targetFramework="net45" />
</packages>

0 comments on commit 1319cf1

Please sign in to comment.