Skip to content

Commit 01e2360

Browse files
Fix failing frontend test
1 parent 1c58194 commit 01e2360

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

frontend/src/app/annotate/search/search.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@let loading = loading$ | async; @let canChangeVisibility = canChangeVisibility$
1+
@let loading = loading$ | async;
2+
@let canChangeVisibility = canChangeVisibility$
23
| async;
34

45
<div class="mb-3">

frontend/src/app/annotate/search/search.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ export class SearchComponent {
117117
).subscribe(queryParams => {
118118
const dataset = queryParams.get('dataset');
119119
const entailmentLabel = queryParams.get('entailmentLabel');
120+
const status = queryParams.get('status');
120121

121122
this.form.patchValue({
122123
dataset: this.isDataset(dataset) ? dataset : null,
123124
entailmentLabel: this.isEntailmentLabel(entailmentLabel) ? entailmentLabel : null,
124-
status: this.isProblemStatus(queryParams.get('status')) ? queryParams.get('status') as ProblemStatus : null,
125+
status: this.isProblemStatus(status) ? status : null,
125126
text: queryParams.get('text') as string | null,
126127
hidden: queryParams.get('hidden') === null ? null : queryParams.get('hidden') === 'true',
127128
});

frontend/src/app/annotate/search/status-info-modal/status-info-modal.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22
import { StatusInfoModalComponent } from './status-info-modal.component';
33
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
4+
import { provideHttpClient } from '@angular/common/http';
45

56
describe('StatusInfoModalComponent', () => {
67
let component: StatusInfoModalComponent;
@@ -9,7 +10,7 @@ describe('StatusInfoModalComponent', () => {
910
beforeEach(async () => {
1011
await TestBed.configureTestingModule({
1112
imports: [StatusInfoModalComponent],
12-
providers: [NgbActiveModal]
13+
providers: [NgbActiveModal, provideHttpClient()]
1314
})
1415
.compileComponents();
1516

0 commit comments

Comments
 (0)