Skip to content

Commit

Permalink
Switch labels to sentence case (Azure#9549)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Dec 18, 2024
1 parent a1be3a1 commit 0de65bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@
</ng-template>
</ng-container>
<span *ngIf="activeAPIRevision && activeAPIRevision!.approvers.length > 0; else noAPIRevisionApprovers" class="small text-muted mt-1">
Approved By: <a *ngFor="let approver of activeAPIRevision!.approvers" href="{{webAppUrl}}Assemblies/Profile/{{approver}}">{{approver}},&nbsp;</a>
Approved by: <a *ngFor="let approver of activeAPIRevision!.approvers" href="{{webAppUrl}}Assemblies/Profile/{{approver}}">{{approver}},&nbsp;</a>
</span>
<ng-template #noAPIRevisionApprovers>
<span class="small text-muted mt-1">Current Revision Approval Pending</span>
<span class="small text-muted mt-1">Current Revision approval pending</span>
</ng-template>
</li>
<li class="list-group-item text-center">
<ng-container *ngIf="reviewIsApproved; else reviewIsNotApproved">
<span class="small text-muted mt-1" id="first-release-approval-message">Approved for First Release By: <a href="{{webAppUrl}}Assemblies/Profile/{{reviewApprover}}">{{reviewApprover}}</a></span>
<span class="small text-muted mt-1" id="first-release-approval-message">Approved for first release by: <a href="{{webAppUrl}}Assemblies/Profile/{{reviewApprover}}">{{reviewApprover}}</a></span>
</ng-container>
<ng-template #reviewIsNotApproved>
<div *ngIf="preferredApprovers.includes(userProfile?.userName!); else userIsNotAPreferedApprover">
<span class="small text-muted">Approves First Release of the package</span>
<span class="small text-muted">Approves first release of the package</span>
<div class="d-grid gap-2">
<button class="btn btn-success" type="button" id="first-release-approval-button"
(click)="handleReviewApprovalAction()"
pTooltip="Package name must be approved before first preview release of a new package."
tooltipPosition="bottom">
Approve First Release
Approve first release
</button>
</div>
<span class="small mt-2 text-muted" id="first-release-approval-message">First Release Approval Pending</span>
<span class="small mt-2 text-muted" id="first-release-approval-message">First release approval pending</span>
</div>
</ng-template>
<ng-template #userIsNotAPreferedApprover>
<span class="small mt-2 text-muted" id="first-release-approval-message">First Release Approval Pending</span>
<span class="small mt-2 text-muted" id="first-release-approval-message">First release approval pending</span>
</ng-template>
</li>
</ul>
Expand Down Expand Up @@ -104,7 +104,7 @@
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="showSystemCommentsSwitch"
(onChange)="onShowSystemCommentsSwitchChange($event)" />
<label class="ms-2">System Comments</label>
<label class="ms-2">System comments</label>
</li>
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="showDocumentationSwitch"
Expand All @@ -119,20 +119,20 @@
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="showLineNumbersSwitch"
(onChange)="onShowLineNumbersSwitchChange($event)" />
<label class="ms-2">Line Numbers</label>
<label class="ms-2">Line numbers</label>
</li>
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="showLeftNavigationSwitch"
(onChange)="onShowLeftNavigationSwitchChange($event)" />
<label class="ms-2">Left Navigation</label>
<label class="ms-2">Left navigation</label>
</li>
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="disableCodeLinesLazyLoading"
(onChange)="onDisableLazyLoadingSwitchChange($event)" />
<label class="ms-2">Disable Lazy Loading</label>
<label class="ms-2">Disable lazy loading</label>
</li>
<li *ngIf="isDiffView" class="list-group-item">
<label class="small mx-1 fw-semibold" for="diff-style-select">Diff Style :</label>
<label class="small mx-1 fw-semibold" for="diff-style-select">Diff style :</label>
<p-dropdown
(onChange)="onDiffStyleChange($event)"
[options]="diffStyleOptions"
Expand All @@ -150,7 +150,7 @@
<li class="list-group-item">
<p-inputSwitch [(ngModel)]="markedAsViewSwitch"
(onChange)="onMarkedAsViewedSwitchChange($event)" />
<label class="ms-2">Mark As Viewed</label>
<label class="ms-2">Mark as viewed</label>
</li>
<li class="list-group-item">
<label class="small mx-1 fw-semibold" for="diff-style-select">Reviewers :</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('ReviewPageOptionsComponent', () => {
const button = fixture.nativeElement.querySelector('#first-release-approval-button');
expect(button).not.toBeTruthy();
const message : HTMLElement = fixture.nativeElement.querySelector('#first-release-approval-message');
expect(message.textContent?.startsWith("Approved for First Release By:")).toBeTruthy()
expect(message.textContent?.startsWith("Approved for first release by:")).toBeTruthy()
});
it('should disable first release approval button when review is not approved and user is not an approver', () => {
component.reviewIsApproved = false;
Expand All @@ -72,7 +72,7 @@ describe('ReviewPageOptionsComponent', () => {
const button = fixture.nativeElement.querySelector('#first-release-approval-button');
expect(button).not.toBeTruthy();
const message : HTMLElement = fixture.nativeElement.querySelector('#first-release-approval-message');
expect(message.textContent).toEqual("First Release Approval Pending");
expect(message.textContent).toEqual("First release approval pending");
});
it('should enable first release approval button when review is not approved and user is an approver', () => {
component.reviewIsApproved = false;
Expand All @@ -83,7 +83,7 @@ describe('ReviewPageOptionsComponent', () => {
const button = fixture.nativeElement.querySelector('#first-release-approval-button');
expect(button).toBeTruthy();
const message : HTMLElement = fixture.nativeElement.querySelector('#first-release-approval-message');
expect(message.textContent).toEqual("First Release Approval Pending");
expect(message.textContent).toEqual("First release approval pending");
});
});

Expand Down

0 comments on commit 0de65bc

Please sign in to comment.