changeset 117:ceafaf9a326a

adding testcase for edit menu option "Show unconnected Hosts" from version 0.16.0
author Jana Fabrikova <jfabriko@redhat.com>
date Mon, 04 Nov 2013 13:23:22 +0100
parents 74e32384684c
children d229ddb8d29a
files ChangeLog patterns/head/AA/MainMenu/menu_edit_show_unconnected_hosts.png src/org/thermostat/qa/framework/Patterns.java src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java
diffstat 4 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 09 15:26:57 2013 +0200
+++ b/ChangeLog	Mon Nov 04 13:23:22 2013 +0100
@@ -1,3 +1,11 @@
+2013-11-04  Jana Fabrikova  <jfabriko@redhat.com>
+
+	* patterns/head/AA/MainMenu/menu_edit_show_unconnected_hosts.png:
+	* src/org/thermostat/qa/framework/Patterns.java:
+	* src/org/thermostat/qa/teststuites/GuiClientSmokeTest.java:
+	adding new testcase (testStartGUIWithStorageMenuEditTest2) for
+	thermostat version 0.16.0 and higher
+
 2013-10-09  Jana Fabrikova  <jfabriko@redhat.com>
 
 	* src/org/thermostat/qa/testsuites/AgentWebStorageTest.java:
Binary file patterns/head/AA/MainMenu/menu_edit_show_unconnected_hosts.png has changed
--- a/src/org/thermostat/qa/framework/Patterns.java	Wed Oct 09 15:26:57 2013 +0200
+++ b/src/org/thermostat/qa/framework/Patterns.java	Mon Nov 04 13:23:22 2013 +0100
@@ -67,6 +67,7 @@
     {
         public static final String CLIENT_PREFERENCES = "MainMenu/menu_edit_client_preferences";
         public static final String ENABLE_HISTORY_MODE = "MainMenu/menu_edit_enable_history_mode";
+        public static final String SHOW_UNCONNECTED_HOSTS = "MainMenu/menu_edit_show_unconnected_hosts";
         public static final String[] SHOW_NON_LIVING_VM = {"MainMenu/menu_edit_show_non_living_vm","MainMenu/menu_edit_show_non_living_vm2"};
     }
 
--- a/src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java	Wed Oct 09 15:26:57 2013 +0200
+++ b/src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java	Mon Nov 04 13:23:22 2013 +0100
@@ -249,6 +249,7 @@
      * <img src="patterns/noAA/MainMenu/menu_edit_enable_history_mode.png"><br /><br />
      * <img src="patterns/noAA/MainMenu/menu_edit_show_non_living_vm.png"><br /><br />
      */
+    @TillVersion("0.15.0")
     public void testStartGUIWithStorageMenuEditTest() throws IOException, AWTException
     {
         GuiRobot robot = startThermostatAndStorage("testStartGUIWithStorageMenuEditTest1");
@@ -266,6 +267,25 @@
         robot.saveScreenshot("testStartGUIWithStorageMenuEditTest2");
         stopThermostatAndStorage(robot);
     }
+    
+    @SinceVersion("0.16.0")
+    public void testStartGUIWithStorageMenuEditTest2() throws IOException, AWTException
+    {
+        GuiRobot robot = startThermostatAndStorage("testStartGUIWithStorageMenuEditTest1");
+
+        enterMainMenu(robot);
+        robot.pressKey(KeyEvent.VK_RIGHT);
+        robot.pressKey(KeyEvent.VK_LEFT);
+        robot.pressKey(KeyEvent.VK_RIGHT);
+        createScreenshot(robot, "testStartGUIWithStorageMenuEditTest1");
+
+        checkForPattern(robot, Patterns.MainWindowMenuEdit.CLIENT_PREFERENCES, "edit/client preferences");
+        checkForPattern(robot, Patterns.MainWindowMenuEdit.SHOW_UNCONNECTED_HOSTS, "edit/show unconnected hosts");
+        checkForPattern(robot, Patterns.MainWindowMenuEdit.SHOW_NON_LIVING_VM, "edit/show non living VM");
+
+        robot.saveScreenshot("testStartGUIWithStorageMenuEditTest2");
+        stopThermostatAndStorage(robot);
+    }
 
     /**
      * Test for presence of items located in View menu.