Added tests for progress logs page
Test cases added:
- Verify Navigation To Progress Logs Page
- Verify Existence Of All Buttons In Progress Logs Page
- Verify Existence Of All Input Boxes In Progress Logs Page
Change-Id: I44a71e3ca6ee0c14fd083deba32827e1dc81fdb9
Signed-off-by: Ashwini Chandrappa <Ashwini.Chandrappa777@ibm.com>
diff --git a/gui/data/gui_variables.py b/gui/data/gui_variables.py
index 769f467..7a39ae0 100644
--- a/gui/data/gui_variables.py
+++ b/gui/data/gui_variables.py
@@ -29,6 +29,7 @@
xpath_dumps_sub_menu = "//*[@data-test-id='nav-item-dumps']"
xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']"
xpath_event_header = "//h1[text()='Event logs']"
+ xpath_progress_logs_sub_menu = "//*[@data-test-id='nav-item-post-code-logs']"
# Hardware status menu
xpath_hardware_status_menu = "//*[@data-test-id='nav-button-hardware-status']"
diff --git a/gui/gui_test/logs_menu/test_progress_logs_sub_menu.robot b/gui/gui_test/logs_menu/test_progress_logs_sub_menu.robot
new file mode 100644
index 0000000..f2ecf29
--- /dev/null
+++ b/gui/gui_test/logs_menu/test_progress_logs_sub_menu.robot
@@ -0,0 +1,59 @@
+*** Settings ***
+
+Documentation Test OpenBMC GUI "Progress logs" sub-menu.
+
+Resource ../../lib/gui_resource.robot
+Resource ../../../lib/logging_utils.robot
+
+Suite Setup Suite Setup Execution
+Suite Teardown Close Browser
+
+
+*** Variables ***
+
+${xpath_progress_logs_heading} //h1[text()="Progress logs"]
+${xpath_search_logs_input} //*[contains(@id,"searchInput")]
+${xpath_from_date_input} //*[@id="input-from-date"]
+${xpath_to_date_input} //*[@id="input-to-date"]
+${xpath_select_all_checkbox} //*[@data-test-id="postCode-checkbox-selectAll"]
+${xpath_progress_action_export} //*[contains(text(),"Export all")]
+
+
+*** Test Cases ***
+
+Verify Navigation To Progress Logs Page
+ [Documentation] Verify navigation to progress logs page.
+ [Tags] Verify_Navigation_To_Progress_Logs_Page
+
+ Page Should Contain Element ${xpath_progress_logs_heading}
+
+
+Verify Existence Of All Buttons In Progress Logs Page
+ [Documentation] Verify existence of all buttons in progress logs page.
+ [Tags] Verify_Existence_Of_All_Buttons_In_Progress_Logs_Page
+
+ Page Should Contain Element ${xpath_select_all_checkbox} limit=1
+ Page Should Contain Element ${xpath_progress_action_export} limit=1
+
+
+Verify Existence Of All Input Boxes In Progress Logs Page
+ [Documentation] Verify existence of all input boxes in progress logs page.
+ [Tags] Verify_Existence_Of_All_Input_Boxes_In_Progress_Logs_Page
+
+ # Search logs.
+ Page Should Contain Element ${xpath_search_logs_input}
+
+ # Date filter.
+ Page Should Contain Element ${xpath_from_date_input} limit=1
+ Page Should Contain Element ${xpath_to_date_input} limit=1
+
+
+*** Keywords ***
+
+Suite Setup Execution
+ [Documentation] Do suite setup tasks.
+
+ Launch Browser And Login GUI
+ Click Element ${xpath_logs_menu}
+ Click Element ${xpath_progress_logs_sub_menu}
+ Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain post-code-logs