2017-11-03 07:36:40 +01:00
|
|
|
*** Settings ***
|
|
|
|
|
|
|
|
Resource ../../resources/Util.robot
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Goto Project Config
|
2019-01-09 09:08:56 +01:00
|
|
|
Sleep 3
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //project-detail//ul/li[contains(.,'Configuration')]
|
2018-03-28 10:45:49 +02:00
|
|
|
Sleep 2
|
2017-11-03 07:36:40 +01:00
|
|
|
|
|
|
|
Click Project Public
|
|
|
|
Mouse Down //hbr-project-policy-config//input[@name='public']
|
|
|
|
Mouse Up //hbr-project-policy-config//input[@name='public']
|
|
|
|
|
|
|
|
Click Content Trust
|
|
|
|
Mouse Down //hbr-project-policy-config//input[@name='content-trust']
|
|
|
|
Mouse Up //hbr-project-policy-config//input[@name='content-trust']
|
|
|
|
|
|
|
|
Click Prevent Running
|
|
|
|
Mouse Down //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
|
|
|
|
Mouse Up //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
|
|
|
|
|
|
|
|
Select Prevent Level
|
|
|
|
#value NEGLIGIBLE LOW MEDIUM HIGH
|
|
|
|
[Arguments] ${level}
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //hbr-project-policy-config//select
|
|
|
|
Retry Element Click //hbr-project-policy-config//select/option[contains(.,'${level}')]
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2017-11-03 07:36:40 +01:00
|
|
|
Click Auto Scan
|
|
|
|
Mouse Down //hbr-project-policy-config//input[@name='scan-image-on-push']
|
|
|
|
Mouse Up //hbr-project-policy-config//input[@name='scan-image-on-push']
|
|
|
|
|
|
|
|
Save Project Config
|
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //hbr-project-policy-config//button[contains(.,'SAVE')]
|
2017-11-03 07:36:40 +01:00
|
|
|
|
|
|
|
Public Should Be Selected
|
|
|
|
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='public']
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2017-11-03 07:36:40 +01:00
|
|
|
Project Should Be Public
|
2017-12-25 03:33:52 +01:00
|
|
|
[Arguments] ${projectName}
|
2019-12-27 07:11:01 +01:00
|
|
|
Retry Wait Until Page Contains Element //clr-dg-row[contains(.,'${projectName}')]//clr-dg-cell[contains(.,'Public')]
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2017-11-03 07:36:40 +01:00
|
|
|
Content Trust Should Be Selected
|
|
|
|
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='content-trust']
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2017-11-03 07:36:40 +01:00
|
|
|
Prevent Running Should Be Selected
|
|
|
|
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2017-11-03 07:36:40 +01:00
|
|
|
Auto Scan Should Be Selected
|
|
|
|
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='scan-image-on-push']
|
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
Select System CVE Whitelist
|
|
|
|
Retry Element Click ${project_config_system_wl_radio_input}
|
|
|
|
|
|
|
|
Select Prject CVE Whitelist
|
|
|
|
Retry Element Click ${project_config_project_wl_radio_input}
|
|
|
|
|
|
|
|
Add System CVE Whitelist to Project CVE Whitelist By Add System Button Click
|
|
|
|
Goto Project Config
|
|
|
|
Select Prject CVE Whitelist
|
|
|
|
Retry Element Click ${project_configuration_wl_project_add_system_btn}
|
|
|
|
Retry Element Click ${project_config_save_btn}
|
|
|
|
|
|
|
|
Set Project To Project Level CVE Whitelist
|
|
|
|
Goto Project Config
|
|
|
|
Select Prject CVE Whitelist
|
|
|
|
Retry Element Click ${project_config_save_btn}
|
|
|
|
|
|
|
|
Add Items to Project CVE Whitelist
|
|
|
|
[Arguments] ${cve_id}
|
|
|
|
Goto Project Config
|
|
|
|
Select Prject CVE Whitelist
|
|
|
|
Retry Element Click ${project_config_project_wl_add_btn}
|
|
|
|
Retry Text Input ${configuration_system_wl_textarea} ${cve_id}
|
|
|
|
Retry Element Click ${project_config_project_wl_add_confirm_btn}
|
|
|
|
Retry Element Click ${project_config_save_btn}
|
|
|
|
|
|
|
|
Delete Top Item In Project CVE Whitelist
|
|
|
|
[Arguments]
|
|
|
|
Goto Project Config
|
|
|
|
Retry Element Click ${project_configuration_wl_delete_a_cve_id_icon}
|
|
|
|
Retry Element Click ${project_config_save_btn}
|