Merge pull request #7292 from jwangyangls/fix_login_robot_issue

Fix nightly test case failed when login harbor.
This commit is contained in:
jwangyangls 2019-04-04 12:14:43 +08:00 committed by GitHub
commit a27df46fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 12 deletions

View File

@ -4,7 +4,7 @@
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}
</label>
<a href="/c/oidc/login" class="login-oidc">
<button type="button" class="btn btn-primary btn-block">
<button type="button" id="log_oidc" class="btn btn-primary btn-block">
<span>{{'BUTTON.LOG_IN_OIDC' | translate }}</span>
</button>
</a>
@ -38,7 +38,7 @@
{{ 'SIGN_IN.INVALID_MSG' | translate }}
</div>
<button [disabled]="isOnGoing || !isValid" type="submit" class="btn btn-primary"
(click)="signIn()">{{ 'BUTTON.LOG_IN' | translate }}</button>
(click)="signIn()" id="log_in">{{ 'BUTTON.LOG_IN' | translate }}</button>
<a href="javascript:void(0)" class="signup" (click)="signUp()"
*ngIf="selfSignUp">{{ 'BUTTON.SIGN_UP_LINK' | translate }}</a>
</div>

View File

@ -85,15 +85,9 @@ export class ProjectDetailComponent implements OnInit {
permissionsList.push(this.userPermissionService.getPermission(projectId,
USERSTATICPERMISSION.LABEL.KEY, USERSTATICPERMISSION.LABEL.VALUE.CREATE));
forkJoin(...permissionsList).subscribe(Rules => {
this.hasLogListPermission = Rules[0] as boolean;
this.hasConfigurationListPermission = Rules[1] as boolean;
this.hasMemberListPermission = Rules[2] as boolean;
this.hasReplicationListPermission = Rules[3] as boolean;
this.hasLabelListPermission = Rules[4] as boolean;
this.hasRepositoryListPermission = Rules[5] as boolean;
this.hasHelmChartsListPermission = Rules[6] as boolean;
this.hasRobotListPermission = Rules[7] as boolean;
this.hasLabelCreatePermission = Rules[8] as boolean;
[this.hasLogListPermission, this.hasConfigurationListPermission, this.hasMemberListPermission, this.hasReplicationListPermission
, this.hasLabelListPermission, this.hasRepositoryListPermission, this.hasHelmChartsListPermission, this.hasRobotListPermission
, this.hasLabelCreatePermission] = Rules;
}, error => this.errorHandler.error(error));
}

View File

@ -28,7 +28,7 @@ ${signup_xpath} //clr-modal/div/div[1]/div/div/div[3]/button[2]
${signup_xpath} /html/body/harbor-app/harbor-shell/clr-main-container/div/div/sign-in/sign-up/clr-modal/div/div[1]/div/div[1]/div/div[3]/button[2]
${search_input} xpath=//*[@id='search_input']
${login_btn} css=.btn
${login_btn} id=log_in
${harbor_span_title} xpath=//span[contains(., 'Harbor')]
${login_name} id=login_username
${login_pwd} id=login_password