Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test Open BMC GUI BMC host information under GUI Header. |
| 4 | |
Sivas SRR | 1999b62 | 2018-02-22 19:35:08 -0600 | [diff] [blame] | 5 | Library DateTime |
| 6 | |
Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 7 | Resource ../../lib/resource.robot |
| 8 | |
Sivas SRR | a692535 | 2018-02-19 08:59:03 -0600 | [diff] [blame] | 9 | Suite Setup Suite Setup Execution |
Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 10 | Suite Teardown Close Browser |
| 11 | |
| 12 | *** Variables *** |
| 13 | ${xpath_select_server_control} //*[@id="header__wrapper"]/div/div[2]/p[2] |
Sivas SRR | ca534e6 | 2018-02-20 02:22:02 -0600 | [diff] [blame] | 14 | ${xpath_select_refresh_button} //*[@id="header__wrapper"]/div/div[3]/button |
Sivas SRR | 1999b62 | 2018-02-22 19:35:08 -0600 | [diff] [blame] | 15 | ${xpath_select_date_text} //*[@id="header__wrapper"]/div/div[3]/p/span |
Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 16 | |
| 17 | *** Test Cases *** |
| 18 | |
| 19 | Verify 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 SRR | ca534e6 | 2018-02-20 02:22:02 -0600 | [diff] [blame] | 28 | Verify 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 SRR | 1999b62 | 2018-02-22 19:35:08 -0600 | [diff] [blame] | 40 | Verify 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 SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 62 | *** Keywords *** |
| 63 | |
Sivas SRR | a692535 | 2018-02-19 08:59:03 -0600 | [diff] [blame] | 64 | Suite Setup Execution |
Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 65 | |
Sivas SRR | a692535 | 2018-02-19 08:59:03 -0600 | [diff] [blame] | 66 | Open Browser With URL ${obmc_gui_url} |
Sivas SRR | 5137ea5 | 2018-02-06 08:23:26 -0600 | [diff] [blame] | 67 | Login OpenBMC GUI ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} |
| 68 | |
| 69 | |
| 70 | |
| 71 | |