Update Deployment security Notary xpath

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-01-13 07:22:32 +00:00
parent 61a0d41532
commit cefdfad35a
2 changed files with 7 additions and 7 deletions

View File

@ -10,16 +10,16 @@ Goto Project Config
Sleep 3
Retry Element Click //project-detail//ul/li[contains(.,'Summary')]
Sleep 3
Retry Double Keywords When Error Retry Element Click //project-detail//ul/li[contains(.,'Configuration')] Retry Wait Element //clr-checkbox-wrapper/label[contains(.,'Enable content trust')]
Retry Double Keywords When Error Retry Element Click //project-detail//ul/li[contains(.,'Configuration')] Retry Wait Element //clr-checkbox-wrapper/label[contains(.,'Prevent vulnerable images from running.')]
Sleep 2
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 Notary Deployment security
Mouse Down //input[@id='content-trust']
Mouse Up //input[@id='content-trust']
Click Prevent Running
Mouse Down //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
@ -47,7 +47,7 @@ Project Should Be Public
Retry Wait Until Page Contains Element //clr-dg-row[contains(.,'${projectName}')]//clr-dg-cell[contains(.,'Public')]
Content Trust Should Be Selected
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='content-trust']
Checkbox Should Be Selected //input[@id='content-trust']
Prevent Running Should Be Selected
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='prevent-vulnerability-image']

View File

@ -23,7 +23,7 @@ ${SSH_USER} root
${HARBOR_ADMIN} admin
*** Test Cases ***
Test Case - Project Level Policy Content Trust
Test Case - Project Level Policy Notary Deployment security
Init Chrome Driver
${d}= Get Current Date result_format=%m%s
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
@ -31,7 +31,7 @@ Test Case - Project Level Policy Content Trust
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world:latest
Go Into Project project${d}
Goto Project Config
Click Content Trust
Click Notary Deployment security
Save Project Config
# Verify
# Unsigned image can not be pulled