mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Added testing utils functions
This commit is contained in:
@@ -44,16 +44,7 @@ import { EnumKeysPipe } from '../utils/enum-keys-pipe';
|
||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||
|
||||
import { GLOBAL_CONFIG, ENV_CONFIG } from '../../../config';
|
||||
|
||||
function createTestComponent<T>(html: string, type: { new(...args: any[]): T }): ComponentFixture<T> {
|
||||
TestBed.overrideComponent(type, {
|
||||
set: { template: html }
|
||||
});
|
||||
const fixture = TestBed.createComponent(type);
|
||||
|
||||
fixture.detectChanges();
|
||||
return fixture as ComponentFixture<T>;
|
||||
}
|
||||
import { createTestComponent } from '../testing/utils';
|
||||
|
||||
function expectPages(fixture: ComponentFixture<any>, pagesDef: string[]): void {
|
||||
const de = fixture.debugElement.query(By.css('.pagination'));
|
||||
|
Reference in New Issue
Block a user