Skip to content

Commit 8a4f24f

Browse files
[DURACOM-303] adapt tests dependencies and template variable
1 parent 990f00b commit 8a4f24f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/app/shared/search/search-results/search-results-skeleton/search-results-skeleton.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</div>
66

77
<ng-container *ngIf="(viewMode$ | async) === ViewMode.ListElement; else grid">
8-
<ng-container *ngFor="let result of loadingResults; let first = $first">
8+
<ng-container *ngFor="let result of loadingResults; let first = first">
99
<div [class.my-4]="!first" class="row">
1010
<div *ngIf="showThumbnails" class="col-3 col-md-2">
1111
<div class="thumbnail-skeleton position-relative">

src/app/shared/search/search-results/search-results-skeleton/search-results-skeleton.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ describe('SearchResultsSkeletonComponent', () => {
1414

1515
beforeEach(async () => {
1616
await TestBed.configureTestingModule({
17-
imports: [SearchResultsSkeletonComponent, NgxSkeletonLoaderModule],
17+
imports: [NgxSkeletonLoaderModule],
18+
declarations: [SearchResultsSkeletonComponent],
1819
providers: [
1920
{ provide: SearchService, useValue: new SearchServiceStub() },
2021
],

src/app/shared/search/search-results/search-results.component.spec.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { SearchResultsComponent } from './search-results.component';
88
import { QueryParamsDirectiveStub } from '../../testing/query-params-directive.stub';
99
import { createFailedRemoteDataObject } from '../../remote-data.utils';
1010
import { SearchResultsSkeletonComponent } from './search-results-skeleton/search-results-skeleton.component';
11+
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
12+
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
13+
import { SearchService } from '../../../core/shared/search/search.service';
14+
import { SearchServiceStub } from '../../testing/search-service.stub';
1115

1216
describe('SearchResultsComponent', () => {
1317
let comp: SearchResultsComponent;
@@ -21,7 +25,12 @@ describe('SearchResultsComponent', () => {
2125
declarations: [
2226
SearchResultsComponent,
2327
SearchResultsSkeletonComponent,
24-
QueryParamsDirectiveStub],
28+
QueryParamsDirectiveStub
29+
],
30+
providers: [
31+
{ provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() },
32+
{ provide: SearchService, useValue: new SearchServiceStub() },
33+
],
2534
schemas: [NO_ERRORS_SCHEMA]
2635
}).compileComponents();
2736
}));

0 commit comments

Comments
 (0)