mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-31 21:18:21 +01:00
Add case about project label
This commit is contained in:
parent
c80e33fd73
commit
a9c7b34de9
@ -240,36 +240,36 @@ Switch To System Labels
|
||||
|
||||
Create New Labels
|
||||
[Arguments] ${labelname}
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/button[1]
|
||||
Click Element xpath=//button[contains(.,'New Label')]
|
||||
Sleep 1
|
||||
Input Text xpath=//*[@id="name"] ${labelname}
|
||||
Sleep 1
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/hbr-create-edit-label/div/form/section/label[2]/clr-dropdown/button
|
||||
Click Element xpath=//div/form/section//clr-dropdown/button
|
||||
Sleep 1
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/hbr-create-edit-label/div/form/section/label[2]/clr-dropdown/clr-dropdown-menu/label[1]
|
||||
Click Element xpath=//div/form/section//clr-dropdown/clr-dropdown-menu/label[1]
|
||||
Sleep 1
|
||||
Input Text xpath=//*[@id="description"] global
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/hbr-create-edit-label/div/form/section/label[4]/button[2]
|
||||
Click Element xpath=//div/form/section/label[4]/button[2]
|
||||
Capture Page Screenshot
|
||||
Wait Until Page Contains ${labelname}
|
||||
|
||||
Update A Label
|
||||
[Arguments] ${labelname}
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[3]/clr-datagrid/div/div/div/clr-dg-table-wrapper/div[2]/clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox
|
||||
Click Element xpath=//clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox
|
||||
Sleep 1
|
||||
Click ELement xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/button[2]
|
||||
Click Element xpath=//button[contains(.,'Edit')]
|
||||
Sleep 1
|
||||
Input Text xpath=//*[@id="name"] ${labelname}
|
||||
Input Text xpath=//*[@id="name"] ${labelname}1
|
||||
Sleep 1
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/hbr-create-edit-label/div/form/section/label[4]/button[2]
|
||||
Click Element xpath=//hbr-create-edit-label//form/section//button[2]
|
||||
Capture Page Screenshot
|
||||
Wait Until Page Contains ${labelname}
|
||||
Wait Until Page Contains ${labelname}1
|
||||
|
||||
Delete A Label
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/div/div[3]/clr-datagrid/div/div/div/clr-dg-table-wrapper/div[2]/clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox
|
||||
Click Element xpath=//clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox
|
||||
Sleep 1
|
||||
Click ELement xpath=//*[@id="system_label"]/hbr-label/div/div/div[2]/button[3]
|
||||
Click ELement xpath=//button[contains(.,'Delete')]
|
||||
Sleep 3
|
||||
Capture Page Screenshot
|
||||
Click Element xpath=//*[@id="system_label"]/hbr-label/div/confirmation-dialog/clr-modal/div/div[1]/div/div[1]/div/div[3]/button[2]
|
||||
Click Element xpath=//clr-modal//div//button[contains(.,'DELETE')]
|
||||
Wait Until Page Contains Deleted successfully
|
||||
|
@ -215,6 +215,14 @@ Edit Repo Info
|
||||
Page Should Contain test_description_info
|
||||
Capture Page Screenshot RepoInfo.png
|
||||
|
||||
Switch To Project Label
|
||||
Click Element xpath=//project-detail//a[contains(.,'Labels')]
|
||||
Sleep 1
|
||||
|
||||
Switch To Project Repo
|
||||
Click Element xpath=//project-detail//a[contains(.,'Repositories')]
|
||||
Sleep 1
|
||||
|
||||
Add Labels To Tag
|
||||
[Arguments] ${tagName} ${labelName}
|
||||
Click Element xpath=//clr-dg-row[contains(.,"${tagName}")]//label
|
||||
|
@ -296,22 +296,56 @@ Test Case - Delete Label
|
||||
Delete A Label
|
||||
Close Browser
|
||||
|
||||
TestCase - Add Labels To A Repo
|
||||
TestCase - Project Admin Operate Labels
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Create An New User ${HARBOR_URL} test${d} test${d}@vmware.com test${d} Test1@34 harbor
|
||||
Create An New Project project${d}
|
||||
Push Image ${ip} test${d} Test1@34 project${d} vmware/photon:1.0
|
||||
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
|
||||
|
||||
Go Into Project project${d}
|
||||
Sleep 2
|
||||
#Add labels
|
||||
Switch To System Labels
|
||||
# Add labels
|
||||
Switch To Project Label
|
||||
Create New Labels label_${d}
|
||||
Sleep 2
|
||||
Update A Label label_${d}
|
||||
Sleep 2
|
||||
Delete A Label
|
||||
Close Browser
|
||||
|
||||
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 ip=${ip} user=test${d} pwd=Test1@34 project=project${d} vmware/photon:1.0
|
||||
|
||||
Go Into Project project${d}
|
||||
Sleep 2
|
||||
# Add labels
|
||||
Switch To Project Label
|
||||
Create New Labels label_${d}
|
||||
Sleep 2
|
||||
Switch To Project Repo
|
||||
Go Into Repo project${d}/vmware/photon
|
||||
Add Labels To Tag 1.0 label_${d}
|
||||
Close Browser
|
||||
|
||||
TestCase - Developer Operate Labels
|
||||
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
|
||||
Logout Harbor
|
||||
Create An New User url=${HARBOR_URL} username=bob${d} email=bob${d}@vmware.com realname=bob${d} newPassword=Test1@34 comment=habor
|
||||
Logout Harbor
|
||||
|
||||
Manage Project Member test${d} Test1@34 project${d} bob${d} Add
|
||||
Change User Role In Project test${d} Test1@34 project${d} bob${d} Developer
|
||||
|
||||
Sign In Harbor ${HARBOR_URL} bob${d} Test1@34
|
||||
Go Into Project project${d}
|
||||
Sleep 3
|
||||
Page Should Not Contain Element xpath=//a[contains(.,'Labels')]
|
||||
Close Browser
|
||||
|
||||
Test Case - Scan A Tag In The Repo
|
||||
Init Chrome Driver
|
||||
${d}= get current date result_format=%m%s
|
||||
|
Loading…
Reference in New Issue
Block a user