1b89977a4SRahul Maheshwari*** Settings ***
2b89977a4SRahul MaheshwariDocumentation  This test suite will validate the "OpenBMC ASMI Menu ->
3b89977a4SRahul Maheshwari...            Server Overview" module.
4b89977a4SRahul Maheshwari
5b89977a4SRahul MaheshwariResource         ../../lib/resource.robot
637159da8SAnusha DathatriResource         ../lib/bmc_network_utils.robot
7b89977a4SRahul MaheshwariTest Setup       Test Setup Execution  ${OBMC_PowerOff_state}
8b89977a4SRahul MaheshwariTest Teardown    Test Teardown Execution
9b89977a4SRahul Maheshwari
10b89977a4SRahul Maheshwari*** Variables ***
11e8568f29SAnusha Dathatri${xpath_select_overview_1}         //*[@href="#/overview/server"]
12b89977a4SRahul Maheshwari${string_content}                  witherspoon
13b89977a4SRahul Maheshwari${string_server_info}              Server information
14b89977a4SRahul Maheshwari${string_high_priority_events}     High priority events
15b89977a4SRahul Maheshwari${string_BMC_info}                 BMC information
1637159da8SAnusha Dathatri${string_power_info}               Power Consumption
17b89977a4SRahul Maheshwari${xpath_high_priority_events}      //a[@href='#/server-health/event-log']
18b89977a4SRahul Maheshwari${string_event_log}                Event log
19b89977a4SRahul Maheshwari${xpath_launch_serial_over_lan}    //a[@class='no-icon quick-links__item']
20b89977a4SRahul Maheshwari${string_launch_serial_over_lan}   Serial over LAN console
21b89977a4SRahul Maheshwari
22b89977a4SRahul Maheshwari*** Test Case ***
23b89977a4SRahul Maheshwari# OpenBMC @ Power Off state test cases.
24b89977a4SRahul Maheshwari
25f119010bSKaushik VenkateshVerify Serial Over LAN Button
26f119010bSKaushik Venkatesh    [Documentation]  Verify console page on clicking serial over lan console button
27f119010bSKaushik Venkatesh    [Tags]  Verify_Serial_Over_LAN_Button
28f119010bSKaushik Venkatesh
29f119010bSKaushik Venkatesh    Select Server Overview Menu
30f119010bSKaushik Venkatesh    Click Element  ${xpath_launch_serial_over_lan}
31f119010bSKaushik Venkatesh    Verify Display Content  Access the Serial over LAN console
32f119010bSKaushik Venkatesh
33b89977a4SRahul MaheshwariVerify Title Text Content At OBMC Power Off State
34b89977a4SRahul Maheshwari    [Documentation]  Verify display of title text from "Server Overview"
35b89977a4SRahul Maheshwari    ...  module of OpenBMC GUI.
36b89977a4SRahul Maheshwari    [Tags]  Verify_Title_Text_Content_At_OBMC_Power_Off_State
37b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_state
38b89977a4SRahul Maheshwari
39b89977a4SRahul Maheshwari    Select Server Overview Menu
40b89977a4SRahul Maheshwari    Verify Display Content  ${string_content}
41b89977a4SRahul Maheshwari
42b89977a4SRahul MaheshwariVerify Display Text Server Information At OBMC Power Off State
43b89977a4SRahul Maheshwari    [Documentation]  Verify existence of text "Server information".
44b89977a4SRahul Maheshwari    [Tags]  Verify_Display_Text_Server_Information_At_OBMC_Power_Off_State
45b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_state
46b89977a4SRahul Maheshwari
47b89977a4SRahul Maheshwari    Select Server Overview Menu
48b89977a4SRahul Maheshwari    Verify Display Content  ${string_server_info}
49b89977a4SRahul Maheshwari
50b89977a4SRahul MaheshwariVerify BMC Information Should Display At OBMC Power Off State
51b89977a4SRahul Maheshwari    [Documentation]  Verify existence of text "BMC information".
52b89977a4SRahul Maheshwari    [Tags]  Verify_BMC_Information_Should_Display_At_OBMC_Power_Off_State
53b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_State
54b89977a4SRahul Maheshwari
55b89977a4SRahul Maheshwari    Select Server Overview Menu
56b89977a4SRahul Maheshwari    Verify Display Content  ${string_BMC_info}
57b89977a4SRahul Maheshwari
58e23afb58SGeorge KeishingVerify Power Consumption Should Display At OBMC Power Off State
5937159da8SAnusha Dathatri    [Documentation]  Verify existence of text "Power Consumption".
6037159da8SAnusha Dathatri    [Tags]  Verify_Power_Consumption_Should_Display_At_OBMC_Power_Off_State
61b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_State
62b89977a4SRahul Maheshwari
63b89977a4SRahul Maheshwari    Select Server Overview Menu
64b89977a4SRahul Maheshwari    Verify Display Content  ${string_power_info}
65b89977a4SRahul Maheshwari
66b89977a4SRahul MaheshwariVerify High Priority Events Should Display At OBMC Power Off State
67b89977a4SRahul Maheshwari    [Documentation]  Verify the text display.
68b89977a4SRahul Maheshwari    [Tags]  Verify_High_Priority_Events_Should_Display_At_OBMC_Power_Off_State
69b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_State
70b89977a4SRahul Maheshwari
71b89977a4SRahul Maheshwari    Select Server Overview Menu
72b89977a4SRahul Maheshwari    Verify Display Content  ${string_high_priority_events}
73b89977a4SRahul Maheshwari
74b89977a4SRahul MaheshwariVerify High Priority Events Can Be Operated At OBMC Power Off State
75b89977a4SRahul Maheshwari    [Documentation]  Will open the "High Priority Events".
76b89977a4SRahul Maheshwari    ...  menu to view and operate.
77b89977a4SRahul Maheshwari    [Tags]  Verify_High_Priority_Events_Can_Be_Operated_At_OBMC_Power_Off_State
78b89977a4SRahul Maheshwari    ...   OBMC_PowerOff_state
79b89977a4SRahul Maheshwari
80b89977a4SRahul Maheshwari    Select Server Overview Menu
81b89977a4SRahul Maheshwari    Click Link  ${xpath_high_priority_events}
82b89977a4SRahul Maheshwari    Verify Display Content  ${string_event_log}
83b89977a4SRahul Maheshwari
84b89977a4SRahul MaheshwariVerify Launching Of Serial Over LAN Console At OBMC Power Off State
85b89977a4SRahul Maheshwari    [Documentation]  Will open the serial over the lan command prompt window.
86b89977a4SRahul Maheshwari    [Tags]  Verify_Launching_Of_Serial_Over_LAN_Console_At_OBMC_Power_Off_State
87b89977a4SRahul Maheshwari    ...  OBMC_PowerOff_State
88b89977a4SRahul Maheshwari
89b89977a4SRahul Maheshwari    Select Server Overview Menu
90b89977a4SRahul Maheshwari    Click Element  ${xpath_launch_serial_over_lan}
91b89977a4SRahul Maheshwari    Verify Display Content  ${string_launch_serial_over_lan}
92b89977a4SRahul Maheshwari
93b89977a4SRahul Maheshwari
94b89977a4SRahul Maheshwari# OpenBMC @ Power Running state test cases.
95b89977a4SRahul Maheshwari
9609856a40SArpana DurgaprasadVerify BMC Information
9709856a40SArpana Durgaprasad    [Documentation]  Get BMC hostname, version, IP, and MAC address via GUI and verify using REST
9809856a40SArpana Durgaprasad    [Tags]  Verify_BMC_Information
9909856a40SArpana Durgaprasad
10009856a40SArpana Durgaprasad    Select Server Overview Menu
10109856a40SArpana Durgaprasad
10209856a40SArpana Durgaprasad    ${hostname}=  Get BMC Hostname
10309856a40SArpana Durgaprasad    ${hostname}=  Remove String  ${hostname}  '
10409856a40SArpana Durgaprasad    ${hostname}=  Fetch From Right  ${hostname}  :
10509856a40SArpana Durgaprasad    Verify Display Content  ${hostname}
10609856a40SArpana Durgaprasad
10709856a40SArpana Durgaprasad    ${version}=  Get BMC Version
10809856a40SArpana Durgaprasad    ${version}=  Remove String  ${version}  "
10909856a40SArpana Durgaprasad    Verify Display Content  ${version}
11009856a40SArpana Durgaprasad
11109856a40SArpana Durgaprasad    ${iplist}=  Get BMC IP Info
112*1244eff8SGeorge Keishing    FOR  ${ip}  IN  @{iplist}
113*1244eff8SGeorge Keishing      ${ip}=  Fetch From Left  ${ip}  /
114*1244eff8SGeorge Keishing      Verify Display Content  ${ip}
115*1244eff8SGeorge Keishing    END
11609856a40SArpana Durgaprasad
11709856a40SArpana Durgaprasad    ${mac}=  Get BMC MAC Address
11809856a40SArpana Durgaprasad    Verify Display Content  ${mac}
11909856a40SArpana Durgaprasad
120b89977a4SRahul MaheshwariVerify High Priority Events Can Be Operated At OBMC Power Running State
121b89977a4SRahul Maheshwari    [Documentation]  Will open the "High Priority Events"
122b89977a4SRahul Maheshwari    ...  menu to view and operate.
123b89977a4SRahul Maheshwari    [Tags]  Verify_High_Priority_Events_Can_Be_Operated_At_OBMC_Power_Running_State
124b89977a4SRahul Maheshwari    ...  OBMC_PowerRunning_state
125b89977a4SRahul Maheshwari    [Setup]  Test Setup Execution  ${OBMC_PowerRunning_state}
126b89977a4SRahul Maheshwari
127b89977a4SRahul Maheshwari    Select Server Overview Menu
128b89977a4SRahul Maheshwari    Click Link  ${xpath_high_priority_events}
129b89977a4SRahul Maheshwari    Verify Display Content  ${string_event_log}
130b89977a4SRahul Maheshwari
131b89977a4SRahul MaheshwariVerify Launching Of Serial Over LAN Console At OBMC Power Running State
132b89977a4SRahul Maheshwari    [Documentation]  Will open the serial over the lan command prompt window.
133b89977a4SRahul Maheshwari    [Tags]  Verify_Launching_Of_Serial_Over_LAN_Console_At_OBMC_Power_Running_State
134b89977a4SRahul Maheshwari    ...  OBMC_PowerRunning_State
135b89977a4SRahul Maheshwari    [Setup]  Test Setup Execution  ${OBMC_PowerRunning_state}
136b89977a4SRahul Maheshwari
137b89977a4SRahul Maheshwari    Select Server Overview Menu
138b89977a4SRahul Maheshwari    Click Element  ${xpath_launch_serial_over_lan}
139b89977a4SRahul Maheshwari    Verify Display Content  ${string_launch_serial_over_lan}
140b89977a4SRahul Maheshwari
141b89977a4SRahul Maheshwari*** Keywords ***
142b89977a4SRahul MaheshwariSelect Server Overview Menu
143b89977a4SRahul Maheshwari    [Documentation]  Selecting of OpenBMC "Server overview" menu.
144b89977a4SRahul Maheshwari
145e8568f29SAnusha Dathatri    Click Element  ${xpath_select_overview_1}
146e8568f29SAnusha Dathatri    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
147e8568f29SAnusha Dathatri    Page Should Contain  Server information
148b89977a4SRahul Maheshwari
149b89977a4SRahul MaheshwariVerify Display Content
150b89977a4SRahul Maheshwari    [Documentation]  Verify text content display.
151b89977a4SRahul Maheshwari    [Arguments]  ${display_text}
152b89977a4SRahul Maheshwari    # Description of argument(s):
153b89977a4SRahul Maheshwari    # display_text   The display text on web page.
154b89977a4SRahul Maheshwari
155b89977a4SRahul Maheshwari    Page Should Contain  ${display_text}
156