Browse Source

Speed up integration tests.

Don't change combo boxes that are already set to the correct value.
pull/10265/head
Steven Kirk 4 years ago
parent
commit
f417491702
  1. 21
      tests/Avalonia.IntegrationTests.Appium/WindowTests.cs
  2. 14
      tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs

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

@ -325,14 +325,23 @@ namespace Avalonia.IntegrationTests.Appium
if (size.HasValue) if (size.HasValue)
sizeTextBox.SendKeys($"{size.Value.Width}, {size.Value.Height}"); sizeTextBox.SendKeys($"{size.Value.Width}, {size.Value.Height}");
modeComboBox.Click(); if (modeComboBox.GetComboBoxValue() != mode.ToString())
_session.FindElementByName(mode.ToString()).SendClick(); {
modeComboBox.Click();
_session.FindElementByName(mode.ToString()).SendClick();
}
locationComboBox.Click(); if (locationComboBox.GetComboBoxValue() != location.ToString())
_session.FindElementByName(location.ToString()).SendClick(); {
locationComboBox.Click();
_session.FindElementByName(location.ToString()).SendClick();
}
stateComboBox.Click(); if (stateComboBox.GetComboBoxValue() != state.ToString())
_session.FindElementByAccessibilityId($"ShowWindowState{state}").SendClick(); {
stateComboBox.Click();
_session.FindElementByAccessibilityId($"ShowWindowState{state}").SendClick();
}
if (canResizeCheckBox.GetIsChecked() != canResize) if (canResizeCheckBox.GetIsChecked() != canResize)
canResizeCheckBox.Click(); canResizeCheckBox.Click();

14
tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs

@ -352,11 +352,17 @@ namespace Avalonia.IntegrationTests.Appium
if (size.HasValue) if (size.HasValue)
sizeTextBox.SendKeys($"{size.Value.Width}, {size.Value.Height}"); sizeTextBox.SendKeys($"{size.Value.Width}, {size.Value.Height}");
modeComboBox.Click(); if (modeComboBox.GetComboBoxValue() != mode.ToString())
_session.FindElementByName(mode.ToString()).SendClick(); {
modeComboBox.Click();
_session.FindElementByName(mode.ToString()).SendClick();
}
locationComboBox.Click(); if (locationComboBox.GetComboBoxValue() != location.ToString())
_session.FindElementByName(location.ToString()).SendClick(); {
locationComboBox.Click();
_session.FindElementByName(location.ToString()).SendClick();
}
if (canResizeCheckBox.GetIsChecked() != canResize) if (canResizeCheckBox.GetIsChecked() != canResize)
canResizeCheckBox.Click(); canResizeCheckBox.Click();

Loading…
Cancel
Save