Skip to content

Commit 8f89041

Browse files
committed
Fix CI
1 parent c83f357 commit 8f89041

File tree

19 files changed

+117
-121
lines changed

19 files changed

+117
-121
lines changed

src/dotnet/APIView/ClientSPA/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@popperjs/core": "^2.11.8",
2323
"@primeng/themes": "^21.0.1",
2424
"@primeuix/themes": "^2.0.2",
25-
"bootstrap": "^5.3.1",
25+
"bootstrap": "^5.3.3",
2626
"bootstrap-icons": "^1.10.5",
2727
"class-transformer": "^0.5.1",
2828
"idb": "^8.0.3",

src/dotnet/APIView/ClientSPA/src/app/_components/conversation-page/conversation-page.component.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ describe('ConversationPageComponent', () => {
2121

2222
beforeEach(() => {
2323
TestBed.configureTestingModule({
24-
declarations: [
24+
imports: [
2525
ConversationPageComponent,
2626
ConversationsComponent,
2727
NavBarComponent,
2828
ReviewInfoComponent,
2929
ReviewPageLayoutComponent,
30-
LanguageNamesPipe
31-
],
32-
imports: [
30+
LanguageNamesPipe,
3331
BrowserAnimationsModule,
3432
HttpClientTestingModule,
3533
MenuModule,

src/dotnet/APIView/ClientSPA/src/app/_components/conversations/conversations.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ describe('ConversationComponent', () => {
1515

1616
beforeEach(() => {
1717
TestBed.configureTestingModule({
18-
declarations: [ConversationsComponent],
1918
imports: [
19+
ConversationsComponent,
2020
HttpClientTestingModule,
2121
ReviewPageModule,
2222
SharedAppModule

src/dotnet/APIView/ClientSPA/src/app/_components/cross-lang-view/cross-lang-view.component.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ describe('CrossLangViewComponent', () => {
99

1010
beforeEach(async () => {
1111
await TestBed.configureTestingModule({
12-
declarations: [CrossLangViewComponent],
13-
imports: [HttpClientTestingModule]
12+
imports: [
13+
CrossLangViewComponent,
14+
HttpClientTestingModule
15+
]
1416
})
1517
.compileComponents();
16-
18+
1719
fixture = TestBed.createComponent(CrossLangViewComponent);
1820
component = fixture.componentInstance;
1921
fixture.detectChanges();

src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.spec.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ describe('ReviewPageOptionsComponent', () => {
2121
beforeEach(() => {
2222
TestBed.configureTestingModule({
2323
declarations: [
24-
ReviewPageOptionsComponent,
25-
PageOptionsSectionComponent
24+
ReviewPageOptionsComponent
2625
],
2726
imports: [
27+
PageOptionsSectionComponent,
2828
HttpClientTestingModule,
2929
HttpClientModule,
3030
BrowserAnimationsModule,
@@ -169,7 +169,7 @@ describe('ReviewPageOptionsComponent', () => {
169169
// Setup for unsupported package
170170
component.review!.packageName = '@azure-rest/test-package';
171171
component.review!.language = 'JavaScript';
172-
172+
173173
// Trigger ngOnChanges
174174
component.ngOnChanges({
175175
activeAPIRevision: {
@@ -232,7 +232,7 @@ describe('ReviewPageOptionsComponent', () => {
232232
const result = component['shouldDisableApproval'](isReviewByCopilotRequired, isVersionReviewedByCopilot);
233233
expect(result).toBe(false);
234234
});
235-
235+
236236
// Test cases that should return TRUE (approval DISABLED)
237237
it('should return true when copilot review required but not completed', () => {
238238
const isReviewByCopilotRequired = true;
@@ -282,12 +282,12 @@ describe('ReviewPageOptionsComponent', () => {
282282
component.review!.language = 'JavaScript';
283283
component.activeAPIRevision!.packageVersion = '1.0.0';
284284
component.activeAPIRevision!.approvers = [];
285-
285+
286286
component.isCopilotReviewSupported = component['isCopilotReviewSupportedForPackage']();
287287
const isReviewByCopilotRequired = true;
288288
const isVersionReviewedByCopilot = false;
289289
const shouldDisable = component['shouldDisableApproval'](isReviewByCopilotRequired, isVersionReviewedByCopilot);
290-
290+
291291
expect(component.isCopilotReviewSupported).toBe(false);
292292
expect(shouldDisable).toBe(false); // Should not disable because copilot not available
293293
});
@@ -297,12 +297,12 @@ describe('ReviewPageOptionsComponent', () => {
297297
component.review!.language = 'JavaScript';
298298
component.activeAPIRevision!.packageVersion = '1.0.0';
299299
component.activeAPIRevision!.approvers = [];
300-
300+
301301
component.isCopilotReviewSupported = component['isCopilotReviewSupportedForPackage']();
302302
const isReviewByCopilotRequired = true;
303303
const isVersionReviewedByCopilot = false;
304304
const shouldDisable = component['shouldDisableApproval'](isReviewByCopilotRequired, isVersionReviewedByCopilot);
305-
305+
306306
expect(component.isCopilotReviewSupported).toBe(true);
307307
expect(shouldDisable).toBe(true); // Should disable because copilot required but not completed
308308
});
@@ -327,78 +327,78 @@ describe('ReviewPageOptionsComponent', () => {
327327
it('should not disable approval when copilot review is not supported', () => {
328328
component.isCopilotReviewSupported = false;
329329
component.activeAPIRevision!.approvers = [];
330-
330+
331331
component['updateApprovalStates'](true, false);
332-
332+
333333
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
334334
});
335335

336336
it('should not disable approval for preview versions', () => {
337337
component.activeAPIRevision!.packageVersion = '1.0.0-beta.1';
338338
component.activeAPIRevision!.approvers = [];
339339
spyOn(component as any, 'isPreviewVersion').and.returnValue(true);
340-
340+
341341
component['updateApprovalStates'](true, false);
342-
342+
343343
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
344344
});
345345

346346
it('should not disable approval when user has already approved', () => {
347347
component.activeAPIRevision!.approvers = ['testuser'];
348-
348+
349349
component['updateApprovalStates'](true, false);
350-
350+
351351
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
352352
});
353353

354354
it('should disable approval when copilot review is required but not completed', () => {
355355
component.activeAPIRevision!.approvers = [];
356-
356+
357357
component['updateApprovalStates'](true, false);
358-
358+
359359
expect(component.isAPIRevisionApprovalDisabled).toBe(true);
360360
});
361361

362362
it('should not disable approval when copilot review is completed', () => {
363363
component.activeAPIRevision!.approvers = [];
364-
364+
365365
component['updateApprovalStates'](true, true);
366-
366+
367367
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
368368
});
369369

370370
it('should not disable approval when copilot review is not required', () => {
371371
component.activeAPIRevision!.approvers = [];
372-
372+
373373
component['updateApprovalStates'](false, false);
374-
374+
375375
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
376376
});
377377

378378
it('should handle copilot not supported overriding requirement', () => {
379379
component.isCopilotReviewSupported = false;
380380
component.activeAPIRevision!.approvers = [];
381-
381+
382382
component['updateApprovalStates'](true, false);
383-
383+
384384
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
385385
});
386386

387387
it('should handle preview version overriding copilot requirement', () => {
388388
component.activeAPIRevision!.packageVersion = '2.0.0-alpha.3';
389389
component.activeAPIRevision!.approvers = [];
390390
spyOn(component as any, 'isPreviewVersion').and.returnValue(true);
391-
391+
392392
component['updateApprovalStates'](true, false);
393-
393+
394394
expect(component.isAPIRevisionApprovalDisabled).toBe(false);
395395
});
396396

397397
it('should set correct button classes when approval is disabled', () => {
398398
component.activeAPIRevision!.approvers = [];
399-
399+
400400
component['updateApprovalStates'](true, false);
401-
401+
402402
expect(component.isAPIRevisionApprovalDisabled).toBe(true);
403403
expect(component.apiRevisionApprovalBtnClass).toBe("btn btn-outline-secondary disabled");
404404
expect(component.apiRevisionApprovalMessage).toBe("To approve the current API revision, it must first be reviewed by Copilot");

src/dotnet/APIView/ClientSPA/src/app/_components/review-page/review-page.component.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ describe('ReviewPageComponent', () => {
3131

3232
beforeEach(() => {
3333
TestBed.configureTestingModule({
34-
declarations: [
34+
declarations: [
3535
ReviewPageComponent,
3636
ReviewNavComponent,
3737
ReviewPageOptionsComponent,
38+
CodePanelComponent,
39+
ReviewsListComponent
40+
],
41+
imports: [
3842
PageOptionsSectionComponent,
3943
NavBarComponent,
4044
ReviewInfoComponent,
41-
CodePanelComponent,
42-
ReviewsListComponent,
4345
RevisionsListComponent,
44-
ApprovalPipe
45-
],
46-
imports: [
46+
ApprovalPipe,
4747
HttpClientTestingModule,
4848
BrowserAnimationsModule,
4949
SharedAppModule,
@@ -81,12 +81,12 @@ describe('ReviewPageComponent', () => {
8181
const reviewId = 'test-review-id';
8282
const activeApiRevisionId = 'test-active-api-revision-id';
8383
const diffApiRevisionId = 'test-diff-api-revision-id';
84-
84+
8585
spyOn(reviewsService, 'getReviewContent').and.returnValue(
8686
of(new HttpResponse<ArrayBuffer>({ status: 204 }))
8787
);
8888
component.loadReviewContent(reviewId, activeApiRevisionId, diffApiRevisionId);
89-
89+
9090
expect(component.loadFailed).toBeTrue();
9191
expect(component.loadFailedMessage).toContain('API-Revision Content Not Found. The');
9292
expect(component.loadFailedMessage).toContain('active and/or diff API-Revision(s) may have been deleted.');
@@ -97,7 +97,7 @@ describe('ReviewPageComponent', () => {
9797
review.isDeleted = true;
9898
spyOn(reviewsService, 'getReview').and.returnValue(of(review));
9999
component.loadReview('testReviewId');
100-
100+
101101
expect(component.loadFailed).toBeTrue();
102102
expect(component.loadFailedMessage).toContain('Review has been deleted.');
103103
});
@@ -129,4 +129,4 @@ describe('ReviewPageComponent', () => {
129129
[activeApiRevisionId, diffApiRevisionId]
130130
);
131131
});
132-
});
132+
});

src/dotnet/APIView/ClientSPA/src/app/_components/revision-options/revision-options.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ describe('ApiRevisionOptionsComponent', () => {
1212

1313
beforeEach(() => {
1414
TestBed.configureTestingModule({
15-
declarations: [RevisionOptionsComponent],
1615
imports: [
16+
RevisionOptionsComponent,
1717
SharedAppModule,
1818
ReviewPageModule
1919
],
@@ -114,7 +114,7 @@ describe('ApiRevisionOptionsComponent', () => {
114114
lastUpdatedOn: '2021-07-04T00:00:00Z',
115115
},
116116
];
117-
117+
118118
it('should correctly tag the latest GA APIRevision', () => {
119119
var result = component.tagLatestGARevision(apiRevisions);
120120
expect(result.id).toEqual('3');

src/dotnet/APIView/ClientSPA/src/app/_components/revision-page/revision-page.component.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ describe('RevisionPageComponent', () => {
2525

2626
beforeEach(() => {
2727
TestBed.configureTestingModule({
28-
declarations: [
28+
imports: [
2929
RevisionPageComponent,
3030
NavBarComponent,
3131
ReviewInfoComponent,
3232
RevisionsListComponent,
3333
ReviewPageLayoutComponent,
34-
LanguageNamesPipe
35-
],
36-
imports: [
34+
LanguageNamesPipe,
3735
BrowserAnimationsModule,
3836
HttpClientTestingModule,
3937
MenubarModule,

src/dotnet/APIView/ClientSPA/src/app/_components/revisions-list/revisions-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ describe('RevisionListComponent', () => {
1111

1212
beforeEach(() => {
1313
TestBed.configureTestingModule({
14-
declarations: [RevisionsListComponent],
1514
imports: [
15+
RevisionsListComponent,
1616
HttpClientTestingModule,
1717
SharedAppModule,
1818
AppModule

src/dotnet/APIView/ClientSPA/src/app/_components/samples-page/samples-page.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ describe('SamplesPageComponent', () => {
2626
beforeEach(() => {
2727
TestBed.configureTestingModule({
2828
declarations: [
29-
SamplesPageComponent,
29+
SamplesPageComponent
30+
],
31+
imports: [
3032
NavBarComponent,
3133
ReviewInfoComponent,
3234
ReviewPageLayoutComponent,
3335
PageOptionsSectionComponent,
34-
LanguageNamesPipe
35-
],
36-
imports: [
36+
LanguageNamesPipe,
3737
BrowserAnimationsModule,
3838
HttpClientTestingModule,
3939
SplitterModule,

0 commit comments

Comments
 (0)