xref: /openbmc/openbmc-test-automation/gui/gui_test/overview_menu/test_overview_menu.robot (revision fb35366548f1ae0ef1314de17536b6d96327af2a)
1*** Settings ***
2
3Documentation  Test OpenBMC GUI "Overview" menu.
4
5Resource        ../../lib/resource.robot
6Resource        ../../../lib/logging_utils.robot
7Resource        ../../../lib/list_utils.robot
8
9Suite Setup     Launch Browser And Login GUI
10Suite Teardown  Close Browser
11Test Setup      Test Setup Execution
12
13
14*** Variables ***
15
16${xpath_overview_page_header}          //h1[contains(text(), "Overview")]
17${xpath_edit_network_settings_button}  //*[@data-test-id='overviewQuickLinks-button-networkSettings']
18
19*** Test Cases ***
20
21Verify Existence Of All Sections In Overview Page
22    [Documentation]  Verify existence of all sections in Overview page.
23    [Tags]  Verify_Existence_Of_All_Sections_In_Overview_Page
24
25    Page Should Contain  BMC information
26    Page Should Contain  Server information
27    Page Should Contain  Network information
28    Page Should Contain  Power consumption
29    Page Should Contain  High priority events
30
31
32Verify Message In High Priority Events Section For No Events
33    [Documentation]  Verify message under high priority events section in case of no events.
34    [Tags]  Verify_Message_In_High_Priority_Events_Section_For_No_Events
35
36    Redfish Purge Event Log
37    Click Element  ${xpath_refresh_button}
38    Wait Until Page Contains  no high priority events to display  timeout=10
39
40
41Verify Server Information Section
42    [Documentation]  Verify values under server information section in overview page.
43    [Tags]  Verify_Server_Information_Section
44
45    ${redfish_machine_model}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  Model
46    Page Should Contain  ${redfish_machine_model}
47
48    ${redfish_serial_number}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  SerialNumber
49    Page Should Contain  ${redfish_serial_number}
50
51    ${redfish_motherboard_manufacturer}=  Redfish.Get Attribute
52    ...  ${REDFISH_CHASSIS_URI}motherboard  Manufacturer
53
54    Page Should Contain  ${redfish_motherboard_manufacturer}
55
56
57Verify BMC Information Section
58    [Documentation]  Verify BMC information section in overview page.
59    [Tags]  Verify_BMC_Information_Section
60
61    ${firmware_version}=  Redfish Get BMC Version
62    Page Should Contain  ${firmware_version}
63
64
65Verify Edit Network Setting Button
66    [Documentation]  Verify navigation to network setting page after clicking the button in overview page.
67    [Tags]  Verify_Edit_Network_Setting_Button
68
69    Click Element  ${xpath_edit_network_settings_button}
70    Wait Until Page Contains Element  ${xpath_network_page_header}
71
72
73Verify Event Under High Priority Events Section
74    [Documentation]  Verify event under high priority events section in case of any event.
75    [Tags]  Verify_Event_Under_High_Priority_Events_Section
76
77    Redfish Purge Event Log
78    Click Element  ${xpath_refresh_button}
79    Generate Test Error Log
80    Wait Until Page Contains  xyz.openbmc_project.Common.Error.InternalFailure  timeout=30s
81
82
83*** Keywords ***
84
85Test Setup Execution
86    [Documentation]  Do test case setup tasks.
87
88    Click Element  ${xpath_overview_menu}
89    Wait Until Page Contains Element  ${xpath_overview_page_header}
90
91