mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
Add new nightly case admin add new users
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
87f006d3a9
commit
8ff4003438
@ -7,6 +7,6 @@
|
||||
<div class="modal-footer">
|
||||
<span class="spinner spinner-inline loading-top" [hidden]="inProgress === false"> </span>
|
||||
<button type="button" class="btn btn-outline" (click)="close()">{{'BUTTON.CANCEL' | translate}}</button>
|
||||
<button type="button" class="btn btn-primary" [disabled]="!isValid || inProgress" (click)="create()">{{'BUTTON.OK' | translate}}</button>
|
||||
<button type="button" id="save-button" class="btn btn-primary" [disabled]="!isValid || inProgress" (click)="create()">{{'BUTTON.OK' | translate}}</button>
|
||||
</div>
|
||||
</clr-modal>
|
@ -11,7 +11,7 @@
|
||||
<div>
|
||||
<clr-datagrid (clrDgRefresh)="load($event)" [clrDgLoading]="inProgress" [(clrDgSelected)]="selectedRow">
|
||||
<clr-dg-action-bar>
|
||||
<button type="button" class="btn btn-secondary" (click)="addNewUser()" [disabled]="!canCreateUser"><clr-icon shape="plus" size="16"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button>
|
||||
<button type="button" class="btn btn-secondary" id="add-new-user" (click)="addNewUser()" [disabled]="!canCreateUser"><clr-icon shape="plus" size="16"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button>
|
||||
<button type="button" class="btn btn-secondary" id="set-admin" [disabled]="!ifSameRole" (click)="changeAdminRole()" ><clr-icon shape="wrench" size="16"></clr-icon> {{ISADMNISTRATOR | translate}}</button>
|
||||
<clr-dropdown [clrCloseMenuOnItemClick]="false" class="btn btn-link" clrDropdownTrigger>
|
||||
<span id='member-action'>{{'BUTTON.ACTIONS' | translate}}<clr-icon shape="caret down"></clr-icon></span>
|
||||
|
@ -46,3 +46,15 @@ User Email Should Exist
|
||||
Add User Button Should Be Disabled
|
||||
Sleep 1
|
||||
Retry Wait Until Page Contains Element //button[contains(.,'New') and @disabled='']
|
||||
|
||||
Add A New User
|
||||
[Arguments] ${username} ${email} ${realname} ${newPassword} ${comment}
|
||||
Retry Element Click xpath=${add_new_user_button}
|
||||
Retry Text Input xpath=${username_xpath} ${username}
|
||||
Retry Text Input xpath=${email_xpath} ${email}
|
||||
Retry Text Input xpath=${realname_xpath} ${realname}
|
||||
Retry Text Input xpath=${newPassword_xpath} ${newPassword}
|
||||
Retry Text Input xpath=${confirmPassword_xpath} ${newPassword}
|
||||
Retry Text Input xpath=${comment_xpath} ${comment}
|
||||
Retry Element Click xpath=${save_new_user_button}
|
||||
Retry Wait Until Page Contains Element xpath=//harbor-user//clr-dg-row//clr-dg-cell[contains(., '${username}')]
|
||||
|
@ -18,3 +18,5 @@ Documentation This resource provides any keywords related to the Harbor private
|
||||
*** Variables ***
|
||||
${administration_user_tag_xpath} //clr-vertical-nav-group-children/a[contains(.,'Users')]
|
||||
${administration_tag_xpath} //clr-vertical-nav-group[contains(.,'Admin')]
|
||||
${add_new_user_button} //*[@id='add-new-user']
|
||||
${save_new_user_button} //*[@id='save-button']
|
||||
|
@ -756,3 +756,21 @@ Test Case - Read Only Mode
|
||||
Sleep 5
|
||||
Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest
|
||||
Close Browser
|
||||
Test Case - Admin Add New Users
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
# can add a new user when self-reg is enbled
|
||||
Switch To Configure
|
||||
Self Reg Should Be Enabled
|
||||
Switch to User Tag
|
||||
Add A New User username=tester${d} email=tester${d}@vmware.com realname=harbortest newPassword=Test1@34 comment=harbortest
|
||||
# can add a new user when self-reg is disabled
|
||||
Switch To Configure
|
||||
Self Reg Should Be Enabled
|
||||
Sleep 1
|
||||
Disable Self Reg
|
||||
Self Reg Should Be Disabled
|
||||
Switch to User Tag
|
||||
Add A New User username=tester2${d} email=tester2${d}@vmware.com realname=harbortest2 newPassword=Test1@34 comment=harbortest2
|
||||
Close Browser
|
||||
|
Loading…
Reference in New Issue
Block a user