mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
Update test cases for UI changes
This commit is contained in:
parent
a1c850cfdb
commit
d536c64566
@ -16,7 +16,7 @@
|
|||||||
<button class="btn btn-sm btn-secondary" (click)="openAddMemberModal()" [disabled]="!hasProjectAdminRole">
|
<button class="btn btn-sm btn-secondary" (click)="openAddMemberModal()" [disabled]="!hasProjectAdminRole">
|
||||||
<span><clr-icon shape="plus" size="16"></clr-icon> {{'MEMBER.NEW_MEMBER' | translate }}</span>
|
<span><clr-icon shape="plus" size="16"></clr-icon> {{'MEMBER.NEW_MEMBER' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<clr-dropdown [clrCloseMenuOnItemClick]="false" class="btn btn-sm btn-secondary" clrDropdownTrigger>
|
<clr-dropdown id='member-action' [clrCloseMenuOnItemClick]="false" class="btn btn-sm btn-secondary" clrDropdownTrigger>
|
||||||
<span>{{'MEMBER.ACTION' | translate}}<clr-icon shape="caret down"></clr-icon></span>
|
<span>{{'MEMBER.ACTION' | translate}}<clr-icon shape="caret down"></clr-icon></span>
|
||||||
<clr-dropdown-menu *clrIfOpen>
|
<clr-dropdown-menu *clrIfOpen>
|
||||||
<button class="btn btn-sm btn-secondary" (click)="changeRole(selectedRow, 1)" [disabled]="!(selectedRow.length && hasProjectAdminRole)">{{'MEMBER.PROJECT_ADMIN' | translate}}</button>
|
<button class="btn btn-sm btn-secondary" (click)="changeRole(selectedRow, 1)" [disabled]="!(selectedRow.length && hasProjectAdminRole)">{{'MEMBER.PROJECT_ADMIN' | translate}}</button>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<clr-datagrid (clrDgRefresh)="load($event)" [clrDgLoading]="inProgress" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="SelectedChange()">
|
<clr-datagrid (clrDgRefresh)="load($event)" [clrDgLoading]="inProgress" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="SelectedChange()">
|
||||||
<clr-dg-action-bar>
|
<clr-dg-action-bar>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" (click)="addNewUser()"><clr-icon shape="plus" size="16"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" (click)="addNewUser()"><clr-icon shape="plus" size="16"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!ifSameRole" (click)="changeAdminRole()" ><clr-icon shape="wrench" size="16"></clr-icon> {{ISADMNISTRATOR | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" id="set-admin" [disabled]="!ifSameRole" (click)="changeAdminRole()" ><clr-icon shape="wrench" size="16"></clr-icon> {{ISADMNISTRATOR | translate}}</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" (click)="deleteUsers(selectedRow)" [disabled]="!selectedRow.length"><clr-icon shape="times" size="16"></clr-icon> {{'USER.DEL_ACTION' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" (click)="deleteUsers(selectedRow)" [disabled]="!selectedRow.length"><clr-icon shape="times" size="16"></clr-icon> {{'USER.DEL_ACTION' | translate}}</button>
|
||||||
</clr-dg-action-bar>
|
</clr-dg-action-bar>
|
||||||
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>
|
||||||
|
@ -28,7 +28,7 @@ Assign User Admin
|
|||||||
#select checkbox
|
#select checkbox
|
||||||
Click Element //clr-dg-row[contains(.,"${user}")]//label
|
Click Element //clr-dg-row[contains(.,"${user}")]//label
|
||||||
#click assign admin
|
#click assign admin
|
||||||
Click Element //button[contains(.,'Set as')]
|
Click Element //*[@id="set-admin"]
|
||||||
Sleep 1
|
Sleep 1
|
||||||
|
|
||||||
Switch to User Tag
|
Switch to User Tag
|
||||||
|
@ -67,13 +67,8 @@ Change Project Member Role
|
|||||||
Click Element xpath=//project-detail//clr-dg-row[contains(.,'${user}')]//label
|
Click Element xpath=//project-detail//clr-dg-row[contains(.,'${user}')]//label
|
||||||
Sleep 1
|
Sleep 1
|
||||||
#change role
|
#change role
|
||||||
Click Element //button[@class='btn dropdown-toggle']
|
Click Element //*[@id="member-action"]
|
||||||
Click Element //button[contains(.,'${role}')]
|
Click Element //button[contains(.,'${role}')]
|
||||||
sleep 1
|
|
||||||
Click Element xpath=//clr-modal//button[contains(.,'SWITCH')]
|
|
||||||
sleep 1
|
|
||||||
Click Element xpath=//clr-modal//button[contains(.,'CLOSE')]
|
|
||||||
|
|
||||||
Sleep 2
|
Sleep 2
|
||||||
Wait Until Page Contains ${role}
|
Wait Until Page Contains ${role}
|
||||||
|
|
||||||
@ -112,10 +107,7 @@ Delete Project Member
|
|||||||
[arguments] ${member}
|
[arguments] ${member}
|
||||||
Click Element xpath=//clr-dg-row[contains(.,'${member}')]//input/../label
|
Click Element xpath=//clr-dg-row[contains(.,'${member}')]//input/../label
|
||||||
Click Element xpath=${project_member_delete_button_xpath}
|
Click Element xpath=${project_member_delete_button_xpath}
|
||||||
Sleep 1
|
Sleep 2
|
||||||
Click Element xpath=${project_member_delete_confirmation_xpath}
|
|
||||||
Sleep 1
|
|
||||||
Click Element xpath=//button[contains(.,'CLOSE')]
|
|
||||||
|
|
||||||
User Should Be Owner Of Project
|
User Should Be Owner Of Project
|
||||||
[Arguments] ${user} ${pwd} ${project}
|
[Arguments] ${user} ${pwd} ${project}
|
||||||
|
@ -28,4 +28,3 @@ ${project_member_search_button_xpath2} //button[contains(.,'New')]
|
|||||||
${project_member_add_button_xpath2} //project-detail//add-member//button[2]
|
${project_member_add_button_xpath2} //project-detail//add-member//button[2]
|
||||||
${project_member_guest_radio_checkbox} //project-detail//form//input[@id='checkrads_guest']
|
${project_member_guest_radio_checkbox} //project-detail//form//input[@id='checkrads_guest']
|
||||||
${project_member_delete_button_xpath} //button[contains(.,"Delete")]
|
${project_member_delete_button_xpath} //button[contains(.,"Delete")]
|
||||||
${project_member_delete_confirmation_xpath} //confiramtion-dialog//button[2]
|
|
||||||
|
@ -82,8 +82,6 @@ Make Project Private
|
|||||||
Go Into Project ${project name}
|
Go Into Project ${project name}
|
||||||
Sleep 1
|
Sleep 1
|
||||||
Click Element xpath=//project-detail//a[contains(.,'Configuration')]
|
Click Element xpath=//project-detail//a[contains(.,'Configuration')]
|
||||||
#Click element xpath=//project//list-project//clr-dg-row-master[contains(.,'${projectname}')]//clr-dg-action-overflow
|
|
||||||
#Click element xpath=//project//list-project//clr-dg-action-overflow//button[contains(.,"Make Private")]
|
|
||||||
Checkbox Should Be Selected xpath=//input[@name='public']
|
Checkbox Should Be Selected xpath=//input[@name='public']
|
||||||
Click Element //clr-checkbox[@name='public']//label
|
Click Element //clr-checkbox[@name='public']//label
|
||||||
Click Element //button[contains(.,'SAVE')]
|
Click Element //button[contains(.,'SAVE')]
|
||||||
@ -93,15 +91,12 @@ Make Project Public
|
|||||||
Go Into Project ${project name}
|
Go Into Project ${project name}
|
||||||
Sleep 1
|
Sleep 1
|
||||||
Click Element xpath=//project-detail//a[contains(.,'Configuration')]
|
Click Element xpath=//project-detail//a[contains(.,'Configuration')]
|
||||||
#Click element xpath=//project//list-project//clr-dg-row-master[contains(.,'${projectname}')]//clr-dg-action-overflow
|
|
||||||
#Click element xpath=//project//list-project//clr-dg-action-overflow//button[contains(.,"Make Public")]
|
|
||||||
Checkbox Should Not Be Selected xpath=//input[@name='public']
|
Checkbox Should Not Be Selected xpath=//input[@name='public']
|
||||||
Click Element //clr-checkbox[@name='public']//label
|
Click Element //clr-checkbox[@name='public']//label
|
||||||
Click Element //button[contains(.,'SAVE')]
|
Click Element //button[contains(.,'SAVE')]
|
||||||
|
|
||||||
Delete Repo
|
Delete Repo
|
||||||
[Arguments] ${projectname}
|
[Arguments] ${projectname}
|
||||||
#Click Element xpath=//project-detail//clr-dg-row-master[contains(.,"${projectname}")]//clr-dg-action-overflow
|
|
||||||
Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label
|
Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label
|
||||||
Sleep 1
|
Sleep 1
|
||||||
Click Element xpath=//button[contains(.,"Delete")]
|
Click Element xpath=//button[contains(.,"Delete")]
|
||||||
@ -113,16 +108,10 @@ Delete Repo
|
|||||||
Delete Project
|
Delete Project
|
||||||
[Arguments] ${projectname}
|
[Arguments] ${projectname}
|
||||||
Sleep 1
|
Sleep 1
|
||||||
#Click Element //list-project//clr-dg-row-master[contains(.,'${projname}')]//clr-dg-action-overflow
|
|
||||||
#Click Element //list-project//clr-dg-row-master[contains(.,'${projname}')]//clr-dg-action-overflow//button[contains(.,'Delete')]
|
|
||||||
#click delete button to confirm
|
|
||||||
Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label
|
Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label
|
||||||
Sleep 1
|
Sleep 1
|
||||||
Click Element xpath=//button[contains(.,"Delete")]
|
Click Element xpath=//button[contains(.,"Delete")]
|
||||||
Sleep 1
|
Sleep 2
|
||||||
Click Element xpath=//clr-modal//button[2]
|
|
||||||
Sleep 1
|
|
||||||
Click Element xpath=//button[contains(.,"CLOSE")]
|
|
||||||
|
|
||||||
Project Should Not Be Deleted
|
Project Should Not Be Deleted
|
||||||
[Arguments] ${projname}
|
[Arguments] ${projname}
|
||||||
@ -205,8 +194,6 @@ Expand Repo
|
|||||||
|
|
||||||
Scan Repo
|
Scan Repo
|
||||||
[Arguments] ${tagname}
|
[Arguments] ${tagname}
|
||||||
#Click Element //hbr-tag//clr-dg-row-master[contains(.,'${tagname}')]//clr-dg-action-overflow
|
|
||||||
#Click Element //hbr-tag//clr-dg-row-master[contains(.,'${tagname}')]//clr-dg-action-overflow//button[contains(.,'Scan')]
|
|
||||||
#select one tag
|
#select one tag
|
||||||
Click Element //clr-dg-row[contains(.,"${tagname}")]//label
|
Click Element //clr-dg-row[contains(.,"${tagname}")]//label
|
||||||
Click Element //button[contains(.,'Scan')]
|
Click Element //button[contains(.,'Scan')]
|
||||||
|
@ -52,5 +52,13 @@ Multi-delete Object
|
|||||||
Click Element //clr-modal//button[contains(.,'DELETE')]
|
Click Element //clr-modal//button[contains(.,'DELETE')]
|
||||||
Sleep 3
|
Sleep 3
|
||||||
|
|
||||||
|
Multi-delete Object Without Confirmation
|
||||||
|
[Arguments] @{obj}
|
||||||
|
:For ${obj} in @{obj}
|
||||||
|
\ Click Element //clr-dg-row[contains(.,'${obj}')]//label
|
||||||
|
Sleep 1
|
||||||
|
Click Element //button[contains(.,'Delete')]
|
||||||
|
Sleep 3
|
||||||
|
|
||||||
Select All On Current Page Object
|
Select All On Current Page Object
|
||||||
Click Element //div[@class='datagrid-head']//label
|
Click Element //div[@class='datagrid-head']//label
|
||||||
|
@ -149,10 +149,10 @@ Test Case - Project Level Policy Public
|
|||||||
Goto Project Config
|
Goto Project Config
|
||||||
Click Project Public
|
Click Project Public
|
||||||
Save Project Config
|
Save Project Config
|
||||||
#verify
|
# Verify
|
||||||
Public Should Be Selected
|
Public Should Be Selected
|
||||||
Back To Projects
|
Back To Projects
|
||||||
#project${d} default should be private
|
# Project${d} default should be private
|
||||||
Project Should Be Public project${d}
|
Project Should Be Public project${d}
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
@ -166,13 +166,13 @@ Test Case - Project Level Policy Content Trust
|
|||||||
Goto Project Config
|
Goto Project Config
|
||||||
Click Content Trust
|
Click Content Trust
|
||||||
Save Project Config
|
Save Project Config
|
||||||
#verify
|
# Verify
|
||||||
Content Trust Should Be Selected
|
Content Trust Should Be Selected
|
||||||
Cannot Pull Unsigned Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world:latest
|
Cannot Pull Unsigned Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world:latest
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
Test Case - Edit Project Creation
|
Test Case - Edit Project Creation
|
||||||
# create normal user and login
|
# Create normal user and login
|
||||||
Init Chrome Driver
|
Init Chrome Driver
|
||||||
${d}= Get Current Date result_format=%m%s
|
${d}= Get Current Date result_format=%m%s
|
||||||
Create An New User url=${HARBOR_URL} username=tester${d} email=tester${d}@vmware.com realname=harbortest newPassword=Test1@34 comment=harbortest
|
Create An New User url=${HARBOR_URL} username=tester${d} email=tester${d}@vmware.com realname=harbortest newPassword=Test1@34 comment=harbortest
|
||||||
@ -206,7 +206,7 @@ Test Case - Edit Self-Registration
|
|||||||
Self Reg Should Be Disabled
|
Self Reg Should Be Disabled
|
||||||
Sleep 1
|
Sleep 1
|
||||||
|
|
||||||
#restore setting
|
# Restore setting
|
||||||
Enable Self Reg
|
Enable Self Reg
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
@ -307,9 +307,8 @@ Test Case - Delete Multi Project
|
|||||||
Create An New Project projectb${d}
|
Create An New Project projectb${d}
|
||||||
Push Image ${ip} test${d} Test1@34 projecta${d} hello-world
|
Push Image ${ip} test${d} Test1@34 projecta${d} hello-world
|
||||||
Filter Object project
|
Filter Object project
|
||||||
Multi-delete Object projecta projectb
|
Multi-delete Object Without Confirmation projecta projectb
|
||||||
#verify delete project with image should not be deleted directly
|
# Verify delete project with image should not be deleted directly
|
||||||
Partly Success
|
|
||||||
Page Should Contain projecta${d}
|
Page Should Contain projecta${d}
|
||||||
Page Should Not Contain projectb${d}
|
Page Should Not Contain projectb${d}
|
||||||
Close Browser
|
Close Browser
|
||||||
@ -327,11 +326,11 @@ Test Case - Delete Multi User
|
|||||||
Switch To User Tag
|
Switch To User Tag
|
||||||
Filter Object delete
|
Filter Object delete
|
||||||
Multi-delete Object deletea deleteb deletec
|
Multi-delete Object deletea deleteb deletec
|
||||||
#assert delete
|
# Assert delete
|
||||||
# Delete Success comment temp wait for fixing
|
# Delete Success comment temp wait for fixing
|
||||||
Click Element //clr-modal//button[contains(.,'CLOSE')]
|
Click Element //clr-modal//button[contains(.,'CLOSE')]
|
||||||
Sleep 1
|
Sleep 1
|
||||||
#filter object delete
|
# Filter object delete
|
||||||
Page Should Not Contain deletea
|
Page Should Not Contain deletea
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
@ -345,7 +344,7 @@ Test Case - Delete Multi Repo
|
|||||||
Sleep 2
|
Sleep 2
|
||||||
Go Into Project project${d}
|
Go Into Project project${d}
|
||||||
Multi-delete Object hello-world busybox
|
Multi-delete Object hello-world busybox
|
||||||
#verify
|
# Verify
|
||||||
Delete Success
|
Delete Success
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
@ -360,7 +359,7 @@ Test Case - Delete Multi Tag
|
|||||||
Go Into Project project${d}
|
Go Into Project project${d}
|
||||||
Go Into Repo hello-world
|
Go Into Repo hello-world
|
||||||
Multi-delete object latest v1
|
Multi-delete object latest v1
|
||||||
#verify
|
# Verify
|
||||||
Delete Success
|
Delete Success
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
@ -377,8 +376,7 @@ Test Case - Delete Multi Member
|
|||||||
Switch To Member
|
Switch To Member
|
||||||
Add Guest Member to project testa${d}
|
Add Guest Member to project testa${d}
|
||||||
Add Guest Member to project testb${d}
|
Add Guest Member to project testb${d}
|
||||||
Multi-delete Object testa${d} testb${d}
|
Multi-delete Object Without Confirmation testa${d} testb${d}
|
||||||
Delete Success
|
|
||||||
Page Should Not Contain testa${d}
|
Page Should Not Contain testa${d}
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user