2018-09-04 09:08:51 +02:00
*** Settings ***
Documentation This resource provides any keywords related to the Harbor private registry appliance
Resource ../../resources/Util.robot
*** Keywords ***
Switch To Project Charts
2019-03-18 11:06:46 +01:00
Retry Element Click ${project_chart_tabpage}
Retry Wait Until Page Contains Element ${project_chart_list}
2018-09-04 09:08:51 +02:00
Upload Chart files
${current_dir}= Run pwd
Run wget ${harbor_chart_file_url}
Run wget ${harbor_chart_prov_file_url}
Run wget ${prometheus_chart_file_url}
2019-03-18 11:06:46 +01:00
Retry Double Keywords When Error Retry Element Click xpath=${upload_chart_button} Retry Wait Until Page Contains Element xpath=${upload_action_button}
2018-09-04 09:08:51 +02:00
${prometheus_file_path} Set Variable ${current_dir}/${prometheus_chart_filename}
Choose File xpath=${chart_file_browse} ${prometheus_file_path}
2019-03-18 11:06:46 +01:00
Retry Double Keywords When Error Retry Element Click xpath=${upload_action_button} Retry Wait Until Page Not Contains Element xpath=${upload_action_button}
2018-09-04 09:08:51 +02:00
2019-03-18 11:06:46 +01:00
Retry Double Keywords When Error Retry Element Click xpath=${upload_chart_button} Retry Wait Until Page Contains Element xpath=${upload_action_button}
2018-09-04 09:08:51 +02:00
${harbor_file_path} Set Variable ${current_dir}/${harbor_chart_filename}
${harbor_prov_file_path} Set Variable ${current_dir}/${harbor_chart_prov_filename}
Choose File xpath=${chart_file_browse} ${harbor_file_path}
Choose File xpath=${chart_prov_browse} ${harbor_prov_file_path}
2019-03-18 11:06:46 +01:00
Retry Double Keywords When Error Retry Element Click xpath=${upload_action_button} Retry Wait Until Page Not Contains Element xpath=${upload_action_button}
2018-09-04 09:08:51 +02:00
2019-03-18 11:06:46 +01:00
Retry Wait Until Page Contains ${prometheus_chart_name}
2018-09-04 09:08:51 +02:00
Go Into Chart Version
[Arguments] ${chart_name}
2019-03-18 11:06:46 +01:00
Retry Element Click xpath=//hbr-helm-chart//a[contains(., '${chart_name}')]
2018-09-04 09:08:51 +02:00
Capture Page Screenshot viewchartversion.png
Go Into Chart Detail
[Arguments] ${version_name}
2019-03-18 11:06:46 +01:00
Retry Element Click xpath=//hbr-helm-chart-version//a[contains(., '${version_name}')]
Retry Wait Until Page Contains Element ${chart_detail}
2018-09-04 09:08:51 +02:00
Go Back To Versions And Delete
2019-01-30 07:22:31 +01:00
Retry Element Click xpath=${version_bread_crumbs}
Retry Element Click xpath=${version_checkbox}
Retry Element Click xpath=${version_delete}
2019-03-01 11:25:45 +01:00
:For ${n} IN RANGE 1 6
\ Log To Console Trying Go Back To Versions And Delete ${n} times ...
\ Retry Element Click xpath=${version_confirm_delete}
\ Capture Page Screenshot
\ ${out} Run Keyword And Ignore Error Retry Wait Until Page Contains Element xpath=${helmchart_content}
\ Capture Page Screenshot
\ Log To Console Return value is ${out[0]}
\ Exit For Loop If '${out[0]}'=='PASS'
\ Sleep 1