blob: 27f0efc2443087f04ac429122f8327943262c7f9 [file] [log] [blame]
Sivas SRR2757d6f2018-04-20 06:36:32 -05001*** Settings ***
2
3Documentation Test Open BMC GUI server configuration firmware update.
4
5Resource ../../lib/resource.robot
Rahul Maheshwarib89977a2019-02-05 00:21:48 -06006Resource ../../../lib/logging_utils.robot
Sivas SRR2757d6f2018-04-20 06:36:32 -05007
8Suite Setup Launch Browser And Login OpenBMC GUI
Rahul Maheshwari43333ff2018-11-26 23:18:36 -06009Suite Teardown Close Browser
Sivas SRR2757d6f2018-04-20 06:36:32 -050010Test Setup Test Setup Execution
Sivas SRRb78a77a2018-06-22 09:01:36 -050011Test Teardown Run Keyword If Test Failed Re-Launch GUI on Failure
Sivas SRR2757d6f2018-04-20 06:36:32 -050012
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 Maheshwari2f8aaa02018-11-29 00:23:09 -060017${xpath_scroll_down} //a[contains(text(), "Scroll down")]
Sivas SRRb78a77a2018-06-22 09:01:36 -050018${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 SRR2757d6f2018-04-20 06:36:32 -050022
23*** Test Cases ***
24
25Verify 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 SRRb78a77a2018-06-22 09:01:36 -050033
34Verify 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 SRR2757d6f2018-04-20 06:36:32 -050043Verify 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 SRRb78a77a2018-06-22 09:01:36 -050051Verify 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
59Verify 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 Keishingd6a77972022-01-31 12:50:29 -060064 [Tags] Verify_Host_Firmware_Download
Sivas SRRb78a77a2018-06-22 09:01:36 -050065
66
Sivas SRR2757d6f2018-04-20 06:36:32 -050067*** Keywords ***
68
69Test Setup Execution
70 [Documentation] Do test case setup tasks.
71
Sivas SRRb78a77a2018-06-22 09:01:36 -050072 Delete All Error Logs
Sivas SRR2757d6f2018-04-20 06:36:32 -050073 Click Element ${xpath_select_server_config}
74 Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
75 Click Element ${xpath_select_firmware}
Sivas SRRb78a77a2018-06-22 09:01:36 -050076
77Upload 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 Dathatrid2563eb2019-10-24 04:26:41 -050088 Wait Until Element Is Visible ${xpath_download_progress} timeout=180
89 Wait Until Element Is Not Visible ${xpath_download_progress} timeout=180
Sivas SRRb78a77a2018-06-22 09:01:36 -050090
Sivas SRRb78a77a2018-06-22 09:01:36 -050091 Check No Error Log Exist
92
93Check No Error Log Exist
94 [Documentation] No error log should be logged.
95
Steven Sombara8800da2018-12-18 16:19:05 -060096 ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}list quiet=${1}
Sivas SRRb78a77a2018-06-22 09:01:36 -050097 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
98 ... msg=Codeupdate Failed with error.
99
100Re-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