Browse Source

fix test on windows.

pull/10532/head
Dan Walmsley 3 years ago
parent
commit
4d343293c8
  1. 10
      samples/IntegrationTestApp/ShowWindowTest.axaml
  2. 4
      tests/Avalonia.IntegrationTests.Appium/WindowTests.cs

10
samples/IntegrationTestApp/ShowWindowTest.axaml

@ -37,13 +37,11 @@
<Label Grid.Column="0" Grid.Row="8">Order (mac)</Label>
<TextBox Name="CurrentOrder" Grid.Column="1" Grid.Row="8" IsReadOnly="True" />
<Button Name="HideButton" Grid.Row="9" Command="{Binding $parent[Window].Hide}">Hide</Button>
<StackPanel Grid.Row="10" Orientation="Horizontal">
<TextBlock Text="MeasuredWith:" />
<TextBlock Name="MeasuredWithText" Text="{Binding #MyBorder.MeasuredWith}" />
</StackPanel>
<Label Grid.Row="9" Content="MeasuredWith:" />
<TextBlock Grid.Column="1" Grid.Row="9" Name="CurrentMeasuredWithText" Text="{Binding #MyBorder.MeasuredWith}" />
<Button Name="HideButton" Grid.Row="10" Command="{Binding $parent[Window].Hide}">Hide</Button>
</Grid>
</integrationTestApp:MeasureBorder>

4
tests/Avalonia.IntegrationTests.Appium/WindowTests.cs

@ -150,8 +150,8 @@ namespace Avalonia.IntegrationTests.Appium
{
using (OpenWindow(new Size(4000, 2200), ShowWindowMode.NonOwned, WindowStartupLocation.Manual))
{
var measuredWithTextBlock = _session.FindElementById("MeasuredWithText");
var screenRectTextBox = _session.FindElementById("CurrentClientSize");
var screenRectTextBox = _session.FindElementByAccessibilityId("CurrentClientSize");
var measuredWithTextBlock = _session.FindElementByAccessibilityId("CurrentMeasuredWithText");
var measuredWithString = measuredWithTextBlock.Text;
var workingAreaString = screenRectTextBox.Text;

Loading…
Cancel
Save