Skip to content

Commit

Permalink
#58 added test for tools menu section
Browse files Browse the repository at this point in the history
  • Loading branch information
burnsoftnet committed Jan 9, 2023
1 parent 10c4022 commit edb9bf3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BSMyGunCollection.UnitTest.Command.Helpers/UI/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ internal static List<BatchCommandList> ClickOnDatabaseCleanUp(bool verify = fals
return cmd;
}

internal static List<BatchCommandList> ClickOnDatabaseHotFixesk(bool verify = false)
internal static List<BatchCommandList> ClickOnDatabaseHotFixes(bool verify = false)
{
List<BatchCommandList> cmd = new List<BatchCommandList>();
cmd.AddRange(ClickOnDatabaseMainMenus(verify));
Expand Down
16 changes: 14 additions & 2 deletions BSMyGunCollection.UnitTest.Command.Helpers/UI/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ public class MainWindow
{
public class MainMenu
{
public static List<BatchCommandList> RunTest(bool verify = false, bool runFile = true, bool runEdit = true, bool runAddItems = true, bool runView = true, bool runReports = true)
public static List<BatchCommandList> RunTest(bool verify = false, bool runFile = true, bool runEdit = true, bool runAddItems = true, bool runView = true, bool runReports = true, bool runTools = true)
{
List<BatchCommandList> cmd = new List<BatchCommandList>();
if (runFile) cmd.AddRange(RunTestFileMenu(verify));
if (runEdit) cmd.AddRange(RunTestEditMenu(verify));
if (runAddItems) cmd.AddRange(RunTestAddItemsMenu(verify));
if (runView) cmd.AddRange(RunTestViewsMenu(verify));
if (runReports) cmd.AddRange(RunTestReportsMenu(verify));
if (runTools) cmd.AddRange(RunTestToolsMenu(verify));
return cmd;
}

Expand Down Expand Up @@ -80,7 +81,7 @@ private static List<BatchCommandList> RunTestViewsMenu(bool verify = false)
cmd.AddRange(FrmMain.Menu.ViewMenu.ClickOnListedAppraisers(verify));
cmd.AddRange(FrmMain.Menu.ViewMenu.ClickOnDocuments(verify));
cmd.AddRange(FrmMain.Menu.ViewMenu.ClickOnImagePicker(verify));

return cmd;
}

Expand All @@ -106,6 +107,17 @@ private static List<BatchCommandList> RunTestReportsMenu(bool verify = false)
cmd.AddRange(FrmMain.Menu.ReportsMenu.ClickOnBlankReportsShooterCard(verify));
return cmd;
}

private static List<BatchCommandList> RunTestToolsMenu(bool verify = false)
{
List<BatchCommandList> cmd = new List<BatchCommandList>();
cmd.AddRange(FrmMain.Menu.ToolsMenu.ClickOnMain(true));
cmd.AddRange(FrmMain.Menu.ToolsMenu.ClickOnSettings(verify));
cmd.AddRange(FrmMain.Menu.ToolsMenu.ClickOnDatabaseCleanUp(verify));
cmd.AddRange(FrmMain.Menu.ToolsMenu.ClickOnDatabaseHotFixes(verify));
cmd.AddRange(FrmMain.Menu.ToolsMenu.ClickOnSearchCollection(verify));
return cmd;
}
}
public class SideMenu
{
Expand Down
2 changes: 1 addition & 1 deletion BSMyGunCollection.UnitTest/UI/MainAppTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void VerifyMainMenu()
bool bans = false;
try
{
List<BatchCommandList> value = _ga.RunBatchCommands(Command.Helpers.UI.MainWindow.MainMenu.RunTest(false, false, false, false, false, true), out _errOut);
List<BatchCommandList> value = _ga.RunBatchCommands(Command.Helpers.UI.MainWindow.MainMenu.RunTest(false, false, false, false, false,false, true), out _errOut);
if (_errOut.Length > 0) throw new Exception(_errOut);
DumpResults(value);
bans = _ga.AllTestsPassed(value);
Expand Down

0 comments on commit edb9bf3

Please sign in to comment.