Skip to content

Commit 415edc7

Browse files
[UXP-242] fix tests and lint
1 parent e7c6c49 commit 415edc7

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('VocabularyTreeviewComponent test suite', () => {
146146
comp.selectedItems = [currentValue];
147147
fixture.detectChanges();
148148
expect(comp.dataSource.data).toEqual([]);
149-
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, testPageInfo, ['entryID'], 'entryID', false, false, false);
149+
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, new PageInfo(), ['entryID'], 'entryID', false, false, false);
150150
});
151151

152152
it('should should init component properly with init value as VocabularyEntry', () => {
@@ -158,7 +158,7 @@ describe('VocabularyTreeviewComponent test suite', () => {
158158
comp.selectedItems = [currentValue];
159159
fixture.detectChanges();
160160
expect(comp.dataSource.data).toEqual([]);
161-
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, testPageInfo, ['entryID'], 'entryID', false, false, false);
161+
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, new PageInfo(), ['entryID'], 'entryID', false, false, false);
162162
});
163163

164164
it('should should init component properly with init value as VocabularyEntryDetail', () => {
@@ -168,7 +168,7 @@ describe('VocabularyTreeviewComponent test suite', () => {
168168
comp.selectedItems = [currentValue];
169169
fixture.detectChanges();
170170
expect(comp.dataSource.data).toEqual([]);
171-
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, testPageInfo, ['entryID'], 'entryID', false, false, false);
171+
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, new PageInfo(), ['entryID'], 'entryID', false, false, false);
172172
});
173173

174174
it('should should init component properly with init value as VocabularyEntry and publicModeOnly enabled', () => {
@@ -181,7 +181,7 @@ describe('VocabularyTreeviewComponent test suite', () => {
181181
comp.selectedItems = [currentValue];
182182
fixture.detectChanges();
183183
expect(comp.dataSource.data).toEqual([]);
184-
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, testPageInfo, ['entryID'], 'entryID', true, false, false);
184+
expect(vocabularyTreeviewServiceStub.initialize).toHaveBeenCalledWith(comp.vocabularyOptions, new PageInfo(), ['entryID'], 'entryID', true, false, false);
185185
});
186186

187187
it('should call loadMore function', () => {

src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges
238238
this.loading = this.vocabularyTreeviewService.isLoading();
239239

240240
const entryId: string = (this.selectedItems?.length > 0) ? this.getEntryId(this.selectedItems[0]) : null;
241-
this.vocabularyTreeviewService.initialize(this.vocabularyOptions, this.initialPageInfo, this.getSelectedEntryIds(), entryId, this.publicModeOnly, this.isRelationComponent, this.loadAllNodes);
241+
this.vocabularyTreeviewService.initialize(this.vocabularyOptions, new PageInfo(), this.getSelectedEntryIds(), entryId, this.publicModeOnly, this.isRelationComponent, this.loadAllNodes);
242242
}
243243

244244
/**
@@ -368,7 +368,7 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges
368368
this.selectedItems = [];
369369
this.searchText = '';
370370
this.vocabularyTreeviewService.cleanTree();
371-
this.vocabularyTreeviewService.initialize(this.vocabularyOptions, this.initialPageInfo, this.getSelectedEntryIds(), null, null, this.isRelationComponent);
371+
this.vocabularyTreeviewService.initialize(this.vocabularyOptions, new PageInfo(), this.getSelectedEntryIds(), null, null, this.isRelationComponent);
372372
}
373373
}
374374
}

0 commit comments

Comments
 (0)