Skip to content

Commit

Permalink
Added test cases for GUI factory reset sub menu
Browse files Browse the repository at this point in the history
Test cases added:
    - Verify Navigation To Factory Reset Page
    - Verify Existence Of All Sections In Factory Reset Page
    - Verify Existence Of All Buttons In Factory Reset Page

Signed-off-by: Rahul Maheshwari <[email protected]>
Change-Id: I8934facf2aeef92493a3918722fc59dc1ad584f1
  • Loading branch information
rahulmah authored and gkeishin committed Jun 7, 2021
1 parent 33d1503 commit 24ae96c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions gui/data/gui_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class gui_variables():

# Control menu
xpath_control_menu = "//*[@data-test-id='nav-button-control']"
xpath_factory_reset_sub_menu = "//*[@data-test-id='nav-item-factory-reset']"
xpath_manage_power_usage_sub_menu = "//*[@data-test-id='nav-item-manage-power-usage']"
xpath_reboot_bmc_sub_menu = "//*[@data-test-id='nav-item-reboot-bmc']"
xpath_server_led_sub_menu = "//*[@data-test-id='nav-item-server-led']"
Expand Down
48 changes: 48 additions & 0 deletions gui/gui_test/control_menu/test_factory_reset_sub_menu.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
*** Settings ***

Documentation Test suite for OpenBMC GUI "Factory reset" sub-menu of "Control" menu.
Resource ../../lib/gui_resource.robot

Suite Setup Suite Setup Execution
Suite Teardown Close Browser


*** Variables ***

${xpath_factory_reset_heading} //h1[text()="Factory reset"]
${xpath_reset_button} //button[contains(text(),'Reset')]


*** Test Cases ***

Verify Navigation To Factory Reset Page
[Documentation] Verify navigation to factory reset page.
[Tags] Verify_Navigation_To_Factory_Reset_Page
Page Should Contain Element ${xpath_factory_reset_heading}


Verify Existence Of All Sections In Factory Reset Page
[Documentation] Verify existence of all sections in factory reset page.
[Tags] Verify_Existence_Of_All_Sections_In_Factory_Reset_Page
Page Should Contain Reset options


Verify Existence Of All Buttons In Factory Reset Page
[Documentation] Verify existence of all buttons in factory reset page.
[Tags] Verify_Existence_Of_All_Buttons_In_Factory_Reset_Page
Page Should Contain Element ${xpath_reset_button}


*** Keywords ***

Suite Setup Execution
[Documentation] Do test suite setup tasks.
Launch Browser And Login GUI
Click Element ${xpath_control_menu}
Click Element ${xpath_factory_reset_sub_menu}
Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain factory-reset

0 comments on commit 24ae96c

Please sign in to comment.