Update tests to redirect to new menu items
This commit is contained in:
parent
ef19b792a1
commit
d72772f62c
8 changed files with 27 additions and 24 deletions
|
|
@ -456,11 +456,6 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
ToolTipText = "Add an.stl, .obj, .amf, .gcode or.zip file to the Library".Localize(),
|
||||
Action = (selectedLibraryItems, listView) =>
|
||||
{
|
||||
/*
|
||||
|
||||
Name = "Library Add Button";
|
||||
*/
|
||||
|
||||
AggContext.FileDialogs.OpenFileDialog(
|
||||
new OpenFileDialogParams(ApplicationSettings.OpenPrintableFileParams, multiSelect: true),
|
||||
(openParams) =>
|
||||
|
|
@ -485,10 +480,6 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
Icon = AggContext.StaticData.LoadIcon("fa-folder-new_16.png", IconColor.Raw),
|
||||
Action = (selectedLibraryItems, listView) =>
|
||||
{
|
||||
/*
|
||||
Name = "Create Folder From Library Button";
|
||||
*/
|
||||
|
||||
DialogWindow.Show(
|
||||
new InputBoxPage(
|
||||
"Create Folder".Localize(),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
testRunner.ClickByName("Create Folder From Library Button");
|
||||
testRunner.InvokeLibraryCreateFolderDialog();
|
||||
|
||||
testRunner.Delay(.5);
|
||||
testRunner.Type("Test Text");
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
//Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Print Queue Row Item Collection");
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
//Get parts to add
|
||||
string rowItemPath = MatterControlUtilities.GetTestItemPath("Batman.stl");
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(File.Exists(exportZipPath), "Queue was exported to zip file, file exists on disk at expected path");
|
||||
|
||||
// Import the exported zip file and confirm the Queue Count increases by 3
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
testRunner.Delay(1);
|
||||
testRunner.Type(exportZipPath);
|
||||
testRunner.Delay(1);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.NavigateToFolder("-Temporary Row Item Collection");
|
||||
|
||||
// Add both files to the FileOpen dialog
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
testRunner.CompleteDialog(
|
||||
string.Format(
|
||||
"\"{0}\" \"{1}\"",
|
||||
|
|
@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.NavigateToFolder("-Temporary Row Item Collection");
|
||||
|
||||
// Add AMF part items to Downloads and then type paths into file dialog
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
testRunner.CompleteDialog(MatterControlUtilities.GetTestItemPath("Rook.amf"), 4);
|
||||
|
||||
Assert.IsTrue(testRunner.WaitForName("Row Item Rook.amf"), "Rook item exists");
|
||||
|
|
@ -81,7 +81,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
testRunner.NavigateToFolder("-Temporary Row Item Collection");
|
||||
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
testRunner.CompleteDialog(MatterControlUtilities.GetTestItemPath("Test.zip"), 4);
|
||||
|
||||
testRunner.DoubleClickByName("Test.zip Row Item Collection");
|
||||
|
|
@ -106,7 +106,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
testRunner.NavigateToFolder("-Temporary Row Item Collection");
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
testRunner.CompleteDialog(MatterControlUtilities.GetTestItemPath("Batman.stl"), 2);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsFalse(testRunner.WaitForName("Row Item 2013-01-25 Mouthpiece V2", 1), "Mouthpiece part should not exist at test start");
|
||||
|
||||
// Add Library item
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
testRunner.Delay(2);
|
||||
testRunner.Type(MatterControlUtilities.GetTestItemPath("Batman.zip"));
|
||||
testRunner.Delay(1);
|
||||
|
|
@ -118,7 +118,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
|
||||
// Create New Folder
|
||||
testRunner.ClickByName("Create Folder From Library Button");
|
||||
testRunner.InvokeLibraryCreateFolderDialog();
|
||||
testRunner.Delay(.5);
|
||||
|
||||
testRunner.Type("New Folder");
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
// Click Add button and select files
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open Fennec_Fox
|
||||
testRunner.CompleteDialog(
|
||||
|
|
@ -83,7 +83,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
// Click Add button and select files
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open Fennec_Fox, Batman files
|
||||
testRunner.CompleteDialog(
|
||||
|
|
@ -197,7 +197,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
// Click Add button and select files
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open Rook
|
||||
testRunner.CompleteDialog(
|
||||
|
|
@ -227,7 +227,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
// Click Add button and select files
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open Batman
|
||||
testRunner.CompleteDialog(
|
||||
|
|
@ -257,7 +257,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
// Click Add button and select files
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open chichen-itza_pyramid
|
||||
testRunner.CompleteDialog(
|
||||
|
|
|
|||
|
|
@ -480,6 +480,18 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Delay(.5);
|
||||
}
|
||||
|
||||
public static void InvokeLibraryAddDialog(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("Print Library Overflow Menu");
|
||||
testRunner.ClickByName("Add Menu Item");
|
||||
}
|
||||
|
||||
public static void InvokeLibraryCreateFolderDialog(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("Print Library Overflow Menu");
|
||||
testRunner.ClickByName("Create Folder Menu Item");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Types the specified text into the dialog and sends {Enter} to complete the interaction
|
||||
/// </summary>
|
||||
|
|
@ -870,7 +882,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
}
|
||||
|
||||
// Add Library item
|
||||
testRunner.ClickByName("Library Add Button");
|
||||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Generate the full, quoted paths for the requested assets
|
||||
string fullQuotedAssetPaths = string.Join(" ", assetNames.Select(name => $"\"{MatterControlUtilities.GetTestItemPath(name)}\""));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue