Skip to content

Commit

Permalink
Fix: searching Rows and Cells in Table (Winforms.DataGridView) for lo…
Browse files Browse the repository at this point in the history
…calized versions of Windows and VS (the Name property can be in different language rather than English).

Add: controls added to corresponding versions of TestApplications. Tests for these controls added to TestStack.White.UITests project.
Fix: Old test for message box fixed for running in localized versions of Windows and VS (the button's Name property is in current locale language).
  • Loading branch information
ritro authored and Jake Ginnivan committed Jul 29, 2013
1 parent 169953c commit 434083c
Show file tree
Hide file tree
Showing 16 changed files with 294 additions and 61 deletions.
115 changes: 64 additions & 51 deletions src/TestApplications/WindowsFormsTestApplication/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions src/TestApplications/WindowsFormsTestApplication/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public Form1()
TreeView.Nodes.Add(treeViewItem);
PopulateDataGrid();
PropertyGrid.SelectedObject = new BasicTypes("str", false, 6, 1.2f);
DataGridControl.DataSource = TestItems;
}

public TestItem[] TestItems
{
get
{
return new[]{
new TestItem {Id = 1, Contents = "Item1", Description = "Simple item 1"},
new TestItem {Id = 2, Contents = "Item2", Description = ""},
new TestItem {Id = 3, Contents = "Item3"}
};
}
}

private void GetMultiple_Click(object sender, System.EventArgs e)
Expand Down
18 changes: 18 additions & 0 deletions src/TestApplications/WindowsFormsTestApplication/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Image.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down Expand Up @@ -345,6 +348,21 @@
<metadata name="details.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="country.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="alive.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="display.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="details.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ToolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>829, 17</value>
</metadata>
Expand Down
9 changes: 9 additions & 0 deletions src/TestApplications/WindowsFormsTestApplication/TestItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace WindowsFormsTestApplication
{
public class TestItem
{
public int Id { get; set; }
public string Contents { get; set; }
public string Description { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<Compile Include="Scenarios\WindowWithScrollbars.Designer.cs">
<DependentUpon>WindowWithScrollbars.cs</DependentUpon>
</Compile>
<Compile Include="TestItem.cs" />
<EmbeddedResource Include="Scenarios\CustomUIItem\CustomUIItemScenario.resx">
<DependentUpon>CustomUIItemScenario.cs</DependentUpon>
</EmbeddedResource>
Expand Down
12 changes: 12 additions & 0 deletions src/TestApplications/WpfTestApplication/HelpClasses.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;

namespace WpfTestApplication
{
public class TestItem
{
public int Id { get; set; }
public string Contents { get; set; }
public string Description { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/TestApplications/WpfTestApplication/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Header="Data Grid">
<DataGrid x:Name="DataGridControl" AutoGenerateColumns="True" ItemsSource="{Binding Path = TestItems}"/>
</TabItem>
</TabControl>
<GroupBox Header="Scenarios" Grid.Row="3" Grid.Column="1" AutomationProperties.AutomationId="ScenariosPane">
<StackPanel>
Expand Down
12 changes: 12 additions & 0 deletions src/TestApplications/WpfTestApplication/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,17 @@ private void ClickMe_OnClick(object sender, RoutedEventArgs e)
{
AutomationProperties.SetHelpText(this, "Click Me Clicked");
}

public TestItem[] TestItems
{
get
{
return new[]{
new TestItem {Id = 1, Contents = "Item1", Description = "Simple item 1"},
new TestItem {Id = 2, Contents = "Item2", Description = ""},
new TestItem {Id = 3, Contents = "Item3"}
};
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<Compile Include="Scenarios\HorizontalGridSplitter.xaml.cs">
<DependentUpon>HorizontalGridSplitter.xaml</DependentUpon>
</Compile>
<Compile Include="HelpClasses.cs" />
<Compile Include="ListControls.xaml.cs">
<DependentUpon>ListControls.xaml</DependentUpon>
</Compile>
Expand Down
Loading

0 comments on commit 434083c

Please sign in to comment.