Skip to content

Commit

Permalink
Fixed #180
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Ginnivan committed Jan 21, 2014
1 parent b1daffa commit ff7d5f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public void GetTestControlType()
Assert.Equal(typeof(TextBox), controlDictionary.GetTestControlType(string.Empty, string.Empty, ControlType.Edit, WindowsFramework.Silverlight.FrameworkId(), true));
Assert.Equal(typeof(DateTimePicker), controlDictionary.GetTestControlType("SysDateTimePick32", string.Empty, ControlType.Pane, WindowsFramework.WinForms.FrameworkId(), true));
Assert.Equal(typeof(DateTimePicker), controlDictionary.GetTestControlType("Winforms.SysDateTimePick32.ad8aa", string.Empty, ControlType.Pane, WindowsFramework.WinForms.FrameworkId(), true));
Assert.Equal(typeof(Win32ListItem), controlDictionary.GetTestControlType(string.Empty, string.Empty, ControlType.ListItem, string.Empty, false));
Assert.Equal(typeof(Win32ListItem), controlDictionary.GetTestControlType(string.Empty, string.Empty, ControlType.ListItem, WindowsFramework.WinForms.FrameworkId(), false));
Assert.Equal(typeof(WPFListItem), controlDictionary.GetTestControlType(string.Empty, string.Empty, ControlType.ListItem, WindowsFramework.Wpf.FrameworkId(), false));
}

[Fact]
Expand Down
3 changes: 3 additions & 0 deletions src/TestStack.White/Mappings/ControlDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public virtual ControlType[] GetControlType(Type testControlType, string framewo

public virtual Type GetTestControlType(string className, string name, ControlType controlType, string frameWorkId, bool isNativeControl)
{
if (Equals(controlType, ControlType.ListItem) && string.IsNullOrEmpty(frameWorkId))
frameWorkId = WindowsFramework.Win32.FrameworkId();

var dictionaryItems = items.Where(controlDictionaryItem =>
{
if (!ControlTypeMatches(controlType, controlDictionaryItem)) return false;
Expand Down

1 comment on commit ff7d5f6

@JakeGinnivan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, would you be able to submit a pull request. I have my hands full on a few other projects but I can still look at simple pull requests :)

Please sign in to comment.