xref: /openbmc/openbmc-test-automation/gui/gui_test/overview_menu/test_overview_menu.robot (revision 7d0a4128b149cfff3132d41da3684138ee02b19e)
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${view_all_event_logs}                 //*[@data-test-id='overviewEvents-button-eventLogs']
19
20*** Test Cases ***
21
22Verify Existence Of All Sections In Overview Page
23    [Documentation]  Verify existence of all sections in Overview page.
24    [Tags]  Verify_Existence_Of_All_Sections_In_Overview_Page
25
26    Page Should Contain  BMC information
27    Page Should Contain  Server information
28    Page Should Contain  Network information
29    Page Should Contain  Power consumption
30    Page Should Contain  High priority events
31
32
33Verify Message In High Priority Events Section For No Events
34    [Documentation]  Verify message under high priority events section in case of no events.
35    [Tags]  Verify_Message_In_High_Priority_Events_Section_For_No_Events
36
37    Redfish Purge Event Log
38    Click Element  ${xpath_refresh_button}
39    Wait Until Page Contains  no high priority events to display  timeout=10
40
41
42Verify Server Information Section
43    [Documentation]  Verify values under server information section in overview page.
44    [Tags]  Verify_Server_Information_Section
45
46    ${redfish_machine_model}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  Model
47    Page Should Contain  ${redfish_machine_model}
48
49    ${redfish_serial_number}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  SerialNumber
50    Page Should Contain  ${redfish_serial_number}
51
52    ${redfish_motherboard_manufacturer}=  Redfish.Get Attribute
53    ...  ${REDFISH_CHASSIS_URI}motherboard  Manufacturer
54
55    Page Should Contain  ${redfish_motherboard_manufacturer}
56
57
58Verify BMC Information Section
59    [Documentation]  Verify BMC information section in overview page.
60    [Tags]  Verify_BMC_Information_Section
61
62    ${firmware_version}=  Redfish Get BMC Version
63    Page Should Contain  ${firmware_version}
64
65
66Verify Edit Network Setting Button
67    [Documentation]  Verify navigation to network setting page after clicking the button in overview page.
68    [Tags]  Verify_Edit_Network_Setting_Button
69
70    Click Element  ${xpath_edit_network_settings_button}
71    Wait Until Page Contains Element  ${xpath_network_page_header}
72
73
74Verify Event Under High Priority Events Section
75    [Documentation]  Verify event under high priority events section in case of any event.
76    [Tags]  Verify_Event_Under_High_Priority_Events_Section
77
78    Redfish Purge Event Log
79    Click Element  ${xpath_refresh_button}
80    Generate Test Error Log
81    Wait Until Page Contains  xyz.openbmc_project.Common.Error.InternalFailure  timeout=30s
82
83
84Verify View All Event Logs Button
85    [Documentation]  Verify view all event log button in overview page.
86    [Tags]  Verify_View_All_Event_Logs_Button
87
88    Generate Test Error Log
89    Page Should Contain Element  ${view_all_event_logs}  timeout=30
90    Click Element  ${view_all_event_logs}
91    Wait Until Page Contains Element  ${xpath_event_header}  timeout=30
92
93
94*** Keywords ***
95
96Test Setup Execution
97    [Documentation]  Do test case setup tasks.
98
99    Click Element  ${xpath_overview_menu}
100    Wait Until Page Contains Element  ${xpath_overview_page_header}
101
102