Update test cases for UI changes

This commit is contained in:
Deng, Qian 2018-01-25 20:35:44 +08:00
parent a1c850cfdb
commit d536c64566
8 changed files with 29 additions and 45 deletions

View File

@ -16,7 +16,7 @@
<button class="btn btn-sm btn-secondary" (click)="openAddMemberModal()" [disabled]="!hasProjectAdminRole">
<span><clr-icon shape="plus" size="16"></clr-icon>&nbsp;{{'MEMBER.NEW_MEMBER' | translate }}</span>
</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>
<clr-dropdown-menu *clrIfOpen>
<button class="btn btn-sm btn-secondary" (click)="changeRole(selectedRow, 1)" [disabled]="!(selectedRow.length && hasProjectAdminRole)">{{'MEMBER.PROJECT_ADMIN' | translate}}</button>

View File

@ -12,7 +12,7 @@
<clr-datagrid (clrDgRefresh)="load($event)" [clrDgLoading]="inProgress" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="SelectedChange()">
<clr-dg-action-bar>
<button type="button" class="btn btn-sm btn-secondary" (click)="addNewUser()"><clr-icon shape="plus" size="16"></clr-icon>&nbsp;{{'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>&nbsp;{{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>&nbsp;{{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>&nbsp;{{'USER.DEL_ACTION' | translate}}</button>
</clr-dg-action-bar>
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>

View File

@ -28,7 +28,7 @@ Assign User Admin
#select checkbox
Click Element //clr-dg-row[contains(.,"${user}")]//label
#click assign admin
Click Element //button[contains(.,'Set as')]
Click Element //*[@id="set-admin"]
Sleep 1
Switch to User Tag

View File

@ -67,13 +67,8 @@ Change Project Member Role
Click Element xpath=//project-detail//clr-dg-row[contains(.,'${user}')]//label
Sleep 1
#change role
Click Element //button[@class='btn dropdown-toggle']
Click Element //*[@id="member-action"]
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
Wait Until Page Contains ${role}
@ -112,10 +107,7 @@ Delete Project Member
[arguments] ${member}
Click Element xpath=//clr-dg-row[contains(.,'${member}')]//input/../label
Click Element xpath=${project_member_delete_button_xpath}
Sleep 1
Click Element xpath=${project_member_delete_confirmation_xpath}
Sleep 1
Click Element xpath=//button[contains(.,'CLOSE')]
Sleep 2
User Should Be Owner Of Project
[Arguments] ${user} ${pwd} ${project}

View File

@ -27,5 +27,4 @@ ${project_member_add_confirmation_ok_xpath} //project-detail//add-member//butto
${project_member_search_button_xpath2} //button[contains(.,'New')]
${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_delete_button_xpath} //button[contains(.,"Delete")]
${project_member_delete_confirmation_xpath} //confiramtion-dialog//button[2]
${project_member_delete_button_xpath} //button[contains(.,"Delete")]

View File

@ -82,8 +82,6 @@ Make Project Private
Go Into Project ${project name}
Sleep 1
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']
Click Element //clr-checkbox[@name='public']//label
Click Element //button[contains(.,'SAVE')]
@ -93,15 +91,12 @@ Make Project Public
Go Into Project ${project name}
Sleep 1
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']
Click Element //clr-checkbox[@name='public']//label
Click Element //button[contains(.,'SAVE')]
Delete Repo
[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
Sleep 1
Click Element xpath=//button[contains(.,"Delete")]
@ -113,16 +108,10 @@ Delete Repo
Delete Project
[Arguments] ${projectname}
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
Sleep 1
Click Element xpath=//button[contains(.,"Delete")]
Sleep 1
Click Element xpath=//clr-modal//button[2]
Sleep 1
Click Element xpath=//button[contains(.,"CLOSE")]
Sleep 2
Project Should Not Be Deleted
[Arguments] ${projname}
@ -205,8 +194,6 @@ Expand Repo
Scan Repo
[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
Click Element //clr-dg-row[contains(.,"${tagname}")]//label
Click Element //button[contains(.,'Scan')]

View File

@ -52,5 +52,13 @@ Multi-delete Object
Click Element //clr-modal//button[contains(.,'DELETE')]
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
Click Element //div[@class='datagrid-head']//label

View File

@ -149,10 +149,10 @@ Test Case - Project Level Policy Public
Goto Project Config
Click Project Public
Save Project Config
#verify
# Verify
Public Should Be Selected
Back To Projects
#project${d} default should be private
# Project${d} default should be private
Project Should Be Public project${d}
Close Browser
@ -166,13 +166,13 @@ Test Case - Project Level Policy Content Trust
Goto Project Config
Click Content Trust
Save Project Config
#verify
# Verify
Content Trust Should Be Selected
Cannot Pull Unsigned Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world:latest
Close Browser
Test Case - Edit Project Creation
# create normal user and login
# Create normal user and login
Init Chrome Driver
${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
@ -206,7 +206,7 @@ Test Case - Edit Self-Registration
Self Reg Should Be Disabled
Sleep 1
#restore setting
# Restore setting
Enable Self Reg
Close Browser
@ -259,7 +259,7 @@ Test Case - Scan A Tag In The Repo
Go Into Repo project${d}/hello-world
Scan Repo latest
Summary Chart Should Display latest
#Edit Repo Info
# Edit Repo Info
Close Browser
Test Case - Manage Project Member
@ -307,9 +307,8 @@ Test Case - Delete Multi Project
Create An New Project projectb${d}
Push Image ${ip} test${d} Test1@34 projecta${d} hello-world
Filter Object project
Multi-delete Object projecta projectb
#verify delete project with image should not be deleted directly
Partly Success
Multi-delete Object Without Confirmation projecta projectb
# Verify delete project with image should not be deleted directly
Page Should Contain projecta${d}
Page Should Not Contain projectb${d}
Close Browser
@ -327,11 +326,11 @@ Test Case - Delete Multi User
Switch To User Tag
Filter Object delete
Multi-delete Object deletea deleteb deletec
#assert delete
#Delete Success comment temp wait for fixing
# Assert delete
# Delete Success comment temp wait for fixing
Click Element //clr-modal//button[contains(.,'CLOSE')]
Sleep 1
#filter object delete
# Filter object delete
Page Should Not Contain deletea
Close Browser
@ -345,7 +344,7 @@ Test Case - Delete Multi Repo
Sleep 2
Go Into Project project${d}
Multi-delete Object hello-world busybox
#verify
# Verify
Delete Success
Close Browser
@ -360,7 +359,7 @@ Test Case - Delete Multi Tag
Go Into Project project${d}
Go Into Repo hello-world
Multi-delete object latest v1
#verify
# Verify
Delete Success
Close Browser
@ -377,8 +376,7 @@ Test Case - Delete Multi Member
Switch To Member
Add Guest Member to project testa${d}
Add Guest Member to project testb${d}
Multi-delete Object testa${d} testb${d}
Delete Success
Multi-delete Object Without Confirmation testa${d} testb${d}
Page Should Not Contain testa${d}
Close Browser