Revise failing tests

- Wait for ReloadAll after calling AddAndSelectPrinter
- Revise ClickQueueRowItemViewAndRemove test
  - Use specialized asserts
  - Assert expected start/end counts
  - Add descriptive failure messages
- Eliminate excess wait times in RemoveAllMenuItemClickedRemovesAll due
  to WaitForName calls. Perform one wait, then assert expected
This commit is contained in:
John Lewin 2016-11-15 15:02:34 -08:00
parent 356157d154
commit d4ce45b449
2 changed files with 22 additions and 35 deletions

View file

@ -236,32 +236,23 @@ namespace MatterHackers.MatterControl.Tests.Automation
public static void AddAndSelectPrinter(AutomationRunner testRunner, string make, string model)
{
testRunner.ClickByName("Printers... Menu", 2);
testRunner.Wait(.2);
testRunner.ClickByName("Add New Printer... Menu Item", 2);
testRunner.Wait(.2);
/* This prompt is no longer shown and causes a 2 second delay. Remove this block once confirmed
testRunner.ClickByName("Connection Wizard Skip Sign In Button", 2);
testRunner.Wait(.2); */
testRunner.ClickByName("Select Make", 2);
testRunner.Wait(.2);
testRunner.Type(make);
testRunner.Type("{Enter}");
testRunner.ClickByName("Select Model", 2);
testRunner.Wait(.2);
testRunner.ClickByName(model + " Menu Item", 2);
testRunner.Wait(.2);
testRunner.ClickByName("Save & Continue Button", 2);
// An unpredictable period of time will pass between Clicking Save, everything reloading and us returning to the caller.
// Block until ReloadAll has completed then close and return to the caller, at which point hopefully everything is reloaded.
WaitForReloadAll(testRunner, () => testRunner.ClickByName("Save & Continue Button", 2));
testRunner.WaitForName("Cancel Wizard Button", 3);
testRunner.ClickByName("Cancel Wizard Button", 2);
testRunner.Wait(1);
testRunner.ClickByName("Cancel Wizard Button", 5);
}
private static void OutputImage(ImageBuffer imageToOutput, string fileName)