add Filter Label about imgs

This commit is contained in:
pfh 2018-04-16 09:54:27 +08:00
parent 9ebe8d64da
commit c99e43674d
3 changed files with 27 additions and 19 deletions

View File

@ -19,22 +19,7 @@ Resource ../../resources/Util.robot
*** Variables ***
${HARBOR_VERSION} v1.1.1
*** Keywords ***
Sign In Harbor
[Arguments] ${url} ${user} ${pw}
Go To ${url}
Sleep 5
${title}= Get Title
Log To Console ${title}
Should Be Equal ${title} Harbor
Sleep 2
Input Text login_username ${user}
Input Text login_password ${pw}
Sleep 2
Click button css=.btn
sleep 5
Log To Console ${user}
Wait Until Page Contains ${user}
Sign Up Should Not Display
Page Should Not Contain Element xpath=${sign_up_button_xpath}

View File

@ -226,9 +226,25 @@ Switch To Project Repo
Add Labels To Tag
[Arguments] ${tagName} ${labelName}
Click Element xpath=//clr-dg-row[contains(.,"${tagName}")]//label
Capture Page Screenshot add_${labelName}.png
Sleep 1
Click Element xpath=//clr-dg-action-bar//clr-dropdown//button
Sleep 1
Click Element xpath=//clr-dropdown//div//label[contains(.,"${labelName}")]
Sleep 3
Page Should Contain Element xpath=//clr-dg-row//label[contains(.,"${labelName}")]
Filter Labels In Tags
[Argument] ${labelName1} ${labelName2}
Sleep 2
Click Element xpath=//clr-dropdown/hbr-filter/span/clr-icon
Capture Page Screenshot filter_${labelName1}.png
Sleep 2
Page Should Contain Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName1}")]
Click Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName1}")]
Sleep 2
Page Should Contain Element xpath=//clr-datagrid//clr-dg-cell[8]/hbr-label-piece/label[contains(.,"${labelName1}")]
Capture Page Screenshot filter_${labelName2}.png
Click Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName2}")]
Sleep 2
Page Should Not Contain Element xpath=//clr-datagrid//clr-dg-cell[8]/hbr-label-piece/label[contains(.,"${labelName2}")]

View File

@ -316,17 +316,24 @@ TestCase - Project Admin Add Labels To Repo
Init Chrome Driver
${d}= Get Current Date result_format=%m%s
Create An New Project With New User url=${HARBOR_URL} username=test${d} email=test${d}@vmware.com realname=test${d} newPassword=Test1@34 comment=harbor projectname=project${d} public=false
Push Image With Tag ${ip} test${d} Test1@34 project${d} vmware/photon 1.0 1.0
## Push Image With Tag ${ip} test${d} Test1@34 project${d} vmware/photon 1.0 1.0
Push Image With Tag ${ip} test${d} Test1@34 project${d} redis 3.2.10-alpine 3.2.10-alpine
Push Image With Tag ${ip} test${d} Test1@34 project${d} redis 4.0.7-alpine 4.0.7-alpine
Go Into Project project${d}
Sleep 2
# Add labels
Switch To Project Label
Create New Labels label_${d}
Capture Page Screenshot CreateLabel1.png
Create New Labels label11111
Capture Page Screenshot CreateLabel2.png
Sleep 2
Switch To Project Repo
Go Into Repo project${d}/vmware/photon
Add Labels To Tag 1.0 label_${d}
Go Into Repo project${d}/redis
Add Labels To Tag 3.2.10-alpine label_${d}
Add Labels To Tag 4.0.7-alpine label11111
Filter Labels In Tags label_${d}
Close Browser
TestCase - Developer Operate Labels