Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test Open BMC GUI server configuration firmware update. |
| 4 | |
| 5 | Resource ../../lib/resource.robot |
Rahul Maheshwari | b89977a | 2019-02-05 00:21:48 -0600 | [diff] [blame] | 6 | Resource ../../../lib/logging_utils.robot |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 7 | |
| 8 | Suite Setup Launch Browser And Login OpenBMC GUI |
Rahul Maheshwari | 43333ff | 2018-11-26 23:18:36 -0600 | [diff] [blame] | 9 | Suite Teardown Close Browser |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 10 | Test Setup Test Setup Execution |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 11 | Test Teardown Run Keyword If Test Failed Re-Launch GUI on Failure |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 12 | |
| 13 | *** Variables *** |
| 14 | ${xpath_select_server_config} //*[@id="nav__top-level"]/li[4]/button |
| 15 | ${xpath_select_firmware} //a[@href='#/configuration/firmware'] |
| 16 | ${xpath_choose_file_button} //*[@id="firmware__upload-form"]/div[1]/label/span[1] |
Rahul Maheshwari | 2f8aaa0 | 2018-11-29 00:23:09 -0600 | [diff] [blame] | 17 | ${xpath_scroll_down} //a[contains(text(), "Scroll down")] |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 18 | ${xpath_tftp_server_ip} //*[@id="tftp-ip"] |
| 19 | ${xpath_tftp_filename} //*[@id="tftp-file-name"] |
| 20 | ${xpath_download_firmware} //*[@id="firmware__upload-form"]/div[2]/fieldset/div[1]/div[3]/input |
| 21 | ${xpath_download_progress} //*[@id="firmware__upload-form"]/div[2]/fieldset/div[2] |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 22 | |
| 23 | *** Test Cases *** |
| 24 | |
| 25 | Verify Select Firmware From Server Configuration |
| 26 | [Documentation] Verify ability to select firmware option from server |
| 27 | ... configuration sub-menu. |
| 28 | [Tags] Verify_Select_Firmware_From_Server_Configuration |
| 29 | |
| 30 | Wait Until Page Contains Firmware |
| 31 | Page Should contain Manage BMC and server firmware |
| 32 | |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 33 | |
| 34 | Verify Scroll Down Link |
| 35 | [Documentation] Verify scroll down link works. |
| 36 | [Tags] Verify_Scroll_Down_Link |
| 37 | |
| 38 | Page Should Contain Element ${xpath_scroll_down} |
| 39 | Click Element ${xpath_scroll_down} |
| 40 | Page Should Contain Element ${xpath_choose_file_button} |
| 41 | |
| 42 | |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 43 | Verify Choose File Button Click |
| 44 | [Documentation] Verify choose file button is clickable. |
| 45 | [Tags] Verify_Choose_File_Button_Click |
| 46 | |
| 47 | Page Should Contain No file chosen |
| 48 | Page Should Contain Element ${xpath_choose_file_button} |
| 49 | Click Element ${xpath_choose_file_button} |
| 50 | |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 51 | Verify BMC Firmware Download |
| 52 | # BMC Firmware File Path located at TFTP server. |
| 53 | ${BMC_IMAGE_FILE_PATH} |
| 54 | [Template] Upload Firmware using TFTP Server |
| 55 | [Documentation] Verify BMC image is download from TFTP server. |
| 56 | [Tags] Verify_BMC_Firmware_Download |
| 57 | |
| 58 | |
| 59 | Verify Host Firmware Download |
| 60 | # Host Firmware File Path located at TFTP server. |
| 61 | ${PNOR_IMAGE_FILE_PATH} |
| 62 | [Template] Upload Firmware using TFTP Server |
| 63 | [Documentation] Verify Host image is download from TFTP server. |
George Keishing | d6a7797 | 2022-01-31 12:50:29 -0600 | [diff] [blame] | 64 | [Tags] Verify_Host_Firmware_Download |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 65 | |
| 66 | |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 67 | *** Keywords *** |
| 68 | |
| 69 | Test Setup Execution |
| 70 | [Documentation] Do test case setup tasks. |
| 71 | |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 72 | Delete All Error Logs |
Sivas SRR | 2757d6f | 2018-04-20 06:36:32 -0500 | [diff] [blame] | 73 | Click Element ${xpath_select_server_config} |
| 74 | Wait Until Page Does Not Contain Element ${xpath_refresh_circle} |
| 75 | Click Element ${xpath_select_firmware} |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 76 | |
| 77 | Upload Firmware using TFTP Server |
| 78 | [Documentation] Upload firmware using TFTP server. |
| 79 | [Arguments] ${firmware_file_name} |
| 80 | |
| 81 | Page Should Contain Button ${xpath_download_firmware} |
| 82 | Page Should Contain Element ${xpath_tftp_server_ip} |
| 83 | Page Should Contain Element ${xpath_tftp_filename} |
| 84 | |
| 85 | Input Text ${xpath_tftp_server_ip} ${TFTP_SERVER} |
| 86 | Input Text ${xpath_tftp_filename} ${firmware_file_name} |
| 87 | Click Button ${xpath_download_firmware} |
Anusha Dathatri | d2563eb | 2019-10-24 04:26:41 -0500 | [diff] [blame] | 88 | Wait Until Element Is Visible ${xpath_download_progress} timeout=180 |
| 89 | Wait Until Element Is Not Visible ${xpath_download_progress} timeout=180 |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 90 | |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 91 | Check No Error Log Exist |
| 92 | |
| 93 | Check No Error Log Exist |
| 94 | [Documentation] No error log should be logged. |
| 95 | |
Steven Sombar | a8800da | 2018-12-18 16:19:05 -0600 | [diff] [blame] | 96 | ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}list quiet=${1} |
Sivas SRR | b78a77a | 2018-06-22 09:01:36 -0500 | [diff] [blame] | 97 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 98 | ... msg=Codeupdate Failed with error. |
| 99 | |
| 100 | Re-Launch GUI on Failure |
| 101 | [Documentation] On failure of test case, close and re-launch GUI. |
| 102 | |
| 103 | Logout And Close Browser |
| 104 | Launch Browser And Login OpenBMC GUI |