blob: 06c2f18086cc9e66a959701dd1a50b24d1dfe33c [file] [log] [blame]
Sivas SRR5137ea52018-02-06 08:23:26 -06001*** Settings ***
2
3Documentation Test Open BMC GUI BMC host information under GUI Header.
4
Sivas SRR1999b622018-02-22 19:35:08 -06005Library DateTime
6
Sivas SRR5137ea52018-02-06 08:23:26 -06007Resource ../../lib/resource.robot
8
Sivas SRRa6925352018-02-19 08:59:03 -06009Suite Setup Suite Setup Execution
Sivas SRR5137ea52018-02-06 08:23:26 -060010Suite Teardown Close Browser
11
12*** Variables ***
13${xpath_select_server_control} //*[@id="header__wrapper"]/div/div[2]/p[2]
Sivas SRRca534e62018-02-20 02:22:02 -060014${xpath_select_refresh_button} //*[@id="header__wrapper"]/div/div[3]/button
Sivas SRR1999b622018-02-22 19:35:08 -060015${xpath_select_date_text} //*[@id="header__wrapper"]/div/div[3]/p/span
Sivas SRR5137ea52018-02-06 08:23:26 -060016
17*** Test Cases ***
18
19Verify IP address
20 [Documentation] Verify BMC IP address displayed in GUI header.
21 [Tags] Verify_IP_address
22
23 # NOTE: gui_displayed_ip can be either a host name or an IP address.
24 # (e.g. "machinex" or "xx.xx.xx.xx").
25 ${gui_displayed_ip}= Get Text ${xpath_select_server_control}
26 Should Contain ${gui_displayed_ip} ${OPENBMC_HOST}
27
Sivas SRRca534e62018-02-20 02:22:02 -060028Verify Refresh Button
29 [Documentation] Verify Refresh Button in GUI header.
30 [Tags] Verify_Refresh_Button
31
32 # Verify power is on after refresh button.
33
34 Expected Initial Test State Off
35 Click Element ${xpath_select_refresh_button}
36 GUI Power On
37 Click Element ${xpath_select_refresh_button}
38 Wait Until Page Contains Running
39
Sivas SRR1999b622018-02-22 19:35:08 -060040Verify Date Last Refreshed
41 [Documentation] Verify Date Last Refreshed text in GUI header.
42 [Tags] Verify_Date_Last_Refreshed
43
44 ${date_info_1st_read}= Get Text ${xpath_select_date_text}
45 ${current_date}= Get Time
46 ${date_conversion}= Convert Date ${current_date} result_format=%b %d %Y
47 Should Contain ${date_info_1st_read} ${date_conversion}
48
49 # Refresh button pressed.
50 Click Element ${xpath_select_refresh_button}
51 Sleep 2
52
53 ${date_info_2nd_read}= Get Text ${xpath_select_date_text}
54 ${current_date}= Get Time
55 ${date_conversion}= Convert Date ${current_date} result_format=%b %d %Y
56 Should Contain ${date_info_2nd_read} ${date_conversion}
57
58 # Comparison between 1st and 2nd read.
59 Should Not Be Equal As Strings ${date_info_1st_read}
60 ... ${date_info_2nd_read}
61
Sivas SRR5137ea52018-02-06 08:23:26 -060062*** Keywords ***
63
Sivas SRRa6925352018-02-19 08:59:03 -060064Suite Setup Execution
Sivas SRR5137ea52018-02-06 08:23:26 -060065
Sivas SRRa6925352018-02-19 08:59:03 -060066 Open Browser With URL ${obmc_gui_url}
Sivas SRR5137ea52018-02-06 08:23:26 -060067 Login OpenBMC GUI ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
68
69
70
71