blob: 65093a4768b518f9b1325df16372618ee752db1c [file] [log] [blame]
Rahul Maheshwarib940e192020-07-07 01:52:24 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Overview" menu.
4
5Resource ../../lib/resource.robot
manashsarma2544cb12020-08-23 14:25:08 -05006Resource ../../../lib/logging_utils.robot
manashsarmafb353662020-08-27 05:12:04 -05007Resource ../../../lib/list_utils.robot
manashsarma6d584de2020-08-30 02:33:07 -05008Resource ../../../lib/bmc_network_utils.robot
9
10Library String
Rahul Maheshwarib940e192020-07-07 01:52:24 -050011
12Suite Setup Launch Browser And Login GUI
13Suite Teardown Close Browser
14Test Setup Test Setup Execution
15
16
17*** Variables ***
18
manashsarma43568c22020-08-19 12:16:24 -050019${xpath_overview_page_header} //h1[contains(text(), "Overview")]
20${xpath_edit_network_settings_button} //*[@data-test-id='overviewQuickLinks-button-networkSettings']
manashsarma7d0a4122020-08-23 13:41:03 -050021${view_all_event_logs} //*[@data-test-id='overviewEvents-button-eventLogs']
manashsarmaa3a25362020-08-23 09:23:28 -050022${xpath_launch_serial_over_lan} //*[@data-test-id='overviewQuickLinks-button-solConsole']
Rahul Maheshwarib940e192020-07-07 01:52:24 -050023
24*** Test Cases ***
25
26Verify Existence Of All Sections In Overview Page
27 [Documentation] Verify existence of all sections in Overview page.
28 [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page
29
30 Page Should Contain BMC information
31 Page Should Contain Server information
32 Page Should Contain Network information
33 Page Should Contain Power consumption
34 Page Should Contain High priority events
35
36
manashsarmafb353662020-08-27 05:12:04 -050037Verify Message In High Priority Events Section For No Events
38 [Documentation] Verify message under high priority events section in case of no events.
39 [Tags] Verify_Message_In_High_Priority_Events_Section_For_No_Events
40
41 Redfish Purge Event Log
42 Click Element ${xpath_refresh_button}
43 Wait Until Page Contains no high priority events to display timeout=10
44
45
manashsarma6d584de2020-08-30 02:33:07 -050046Verify Network Information In Overview Page
47 [Documentation] Verify values under network information section.
48 [Tags] Verify_Network_Information_In_Overview Page
49
50 ${hostname}= Get BMC Hostname
51 Page Should Contain ${hostname}
52
53 # Get all IP addresses and prefix lengths on system.
54
55 ${ip_addr_list}= Get BMC IP Info
56 FOR ${ip_address} IN @{ip_addr_list}
57 ${ip}= Fetch From Left ${ip_address} \/
58 Page Should Contain ${ip}
59 END
60
61 ${macaddr}= Get BMC MAC Address
62 Page Should Contain ${macaddr}
63
64
65Verify Message In High Priority Events Section For No Events
66 [Documentation] Verify message under high priority events section in case of no events.
67 [Tags] Verify_Message_In_High_Priority_Events_Section_For_No_Events
68
69 Redfish Purge Event Log
70 Click Element ${xpath_refresh_button}
71 Wait Until Page Contains no high priority events to display timeout=10
72
73
manashsarmae18f99e2020-08-28 10:12:57 -050074Verify Server Information Section
75 [Documentation] Verify values under server information section in overview page.
76 [Tags] Verify_Server_Information_Section
77
78 ${redfish_machine_model}= Redfish.Get Attribute /redfish/v1/Systems/system/ Model
79 Page Should Contain ${redfish_machine_model}
80
81 ${redfish_serial_number}= Redfish.Get Attribute /redfish/v1/Systems/system/ SerialNumber
82 Page Should Contain ${redfish_serial_number}
83
84 ${redfish_motherboard_manufacturer}= Redfish.Get Attribute
manashsarma58de7d72020-09-07 21:05:21 -050085 ... /redfish/v1/Systems/system/ Manufacturer
manashsarmae18f99e2020-08-28 10:12:57 -050086
87 Page Should Contain ${redfish_motherboard_manufacturer}
88
89
manashsarma554ddec2020-08-26 00:46:02 -050090Verify BMC Information Section
91 [Documentation] Verify BMC information section in overview page.
92 [Tags] Verify_BMC_Information_Section
93
94 ${firmware_version}= Redfish Get BMC Version
95 Page Should Contain ${firmware_version}
96
97
manashsarma43568c22020-08-19 12:16:24 -050098Verify Edit Network Setting Button
99 [Documentation] Verify navigation to network setting page after clicking the button in overview page.
100 [Tags] Verify_Edit_Network_Setting_Button
101
102 Click Element ${xpath_edit_network_settings_button}
103 Wait Until Page Contains Element ${xpath_network_page_header}
104
105
manashsarmafb353662020-08-27 05:12:04 -0500106Verify Event Under High Priority Events Section
107 [Documentation] Verify event under high priority events section in case of any event.
108 [Tags] Verify_Event_Under_High_Priority_Events_Section
109
110 Redfish Purge Event Log
111 Click Element ${xpath_refresh_button}
112 Generate Test Error Log
113 Wait Until Page Contains xyz.openbmc_project.Common.Error.InternalFailure timeout=30s
114
115
manashsarma7d0a4122020-08-23 13:41:03 -0500116Verify View All Event Logs Button
117 [Documentation] Verify view all event log button in overview page.
118 [Tags] Verify_View_All_Event_Logs_Button
119
120 Generate Test Error Log
121 Page Should Contain Element ${view_all_event_logs} timeout=30
122 Click Element ${view_all_event_logs}
123 Wait Until Page Contains Element ${xpath_event_header} timeout=30
124
125
manashsarmaa3a25362020-08-23 09:23:28 -0500126Verify Serial Over LAN Console Button In Overview Page
127 [Documentation] Click serial over LAN button and verify page navigation to serial over LAN page.
128 [Tags] Verify_Serial_Over_LAN_Console_Button_In_Overview_Page
129
130 Click Element ${xpath_launch_serial_over_lan}
manashsarma90a230a2020-09-07 20:41:18 -0500131 Wait Until Page Contains Element ${xpath_sol_header}
manashsarmaa3a25362020-08-23 09:23:28 -0500132
133
Rahul Maheshwarib940e192020-07-07 01:52:24 -0500134*** Keywords ***
135
136Test Setup Execution
137 [Documentation] Do test case setup tasks.
138
139 Click Element ${xpath_overview_menu}
140 Wait Until Page Contains Element ${xpath_overview_page_header}
141