1*** Settings ***
2
3Documentation   Test suite for OpenBMC GUI "Factory reset" sub-menu of "Settings" menu.
4
5Resource        ../../lib/gui_resource.robot
6
7Suite Setup     Suite Setup Execution
8Suite Teardown  Close Browser
9
10
11*** Variables ***
12
13${xpath_factory_reset_heading}          //h1[text()="Factory reset"]
14${xpath_reset_button}                   //button[contains(text(),'Reset')]
15${xpath_reset_server_radio_button}      //*[@data-test-id='factoryReset-radio-resetBios']
16${xpath_reset_bmc_server_radio_button}  //*[@data-test-id='factoryReset-radio-resetToDefaults']
17
18
19*** Test Cases ***
20
21Verify Navigation To Factory Reset Page
22    [Documentation]  Verify navigation to factory reset page.
23    [Tags]  Verify_Navigation_To_Factory_Reset_Page
24
25    Page Should Contain Element  ${xpath_factory_reset_heading}
26
27
28Verify Existence Of All Sections In Factory Reset Page
29    [Documentation]  Verify existence of all sections in factory reset page.
30    [Tags]  Verify_Existence_Of_All_Sections_In_Factory_Reset_Page
31
32    Page Should Contain  Reset options
33
34
35Verify Existence Of All Buttons In Factory Reset Page
36    [Documentation]  Verify existence of all buttons in factory reset page.
37    [Tags]  Verify_Existence_Of_All_Buttons_In_Factory_Reset_Page
38
39    Page Should Contain Element  ${xpath_reset_button}
40
41
42Verify Existence Of All Radio Buttons In Factory Reset Page
43     [Documentation]  Verify existence of all radio buttons in factory reset page.
44     [Tags]  Verify_Existence_Of_All_Radio_Buttons_In_Factory_Reset_Page
45
46     Page Should Contain Element  ${xpath_reset_server_radio_button}
47     Page Should Contain Element  ${xpath_reset_bmc_server_radio_button}
48
49
50*** Keywords ***
51
52Suite Setup Execution
53    [Documentation]  Do test suite setup tasks.
54
55    Launch Browser And Login GUI
56    Click Element  ${xpath_settings_menu}
57    Click Element  ${xpath_factory_reset_sub_menu}
58    Wait Until Keyword Succeeds  30 sec  5 sec  Location Should Contain  factory-reset
59
60