"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts" between
dspace-angular-dspace-7.0.tar.gz and dspace-angular-dspace-7.1.tar.gz

About: dspace-angular is the Angular-based frontend of DSpace, a digital repository system to capture, store, index, preserve and redistribute an organization’s research material in digital formats.

item-version-history.component.spec.ts  (dspace-angular-dspace-7.0):item-version-history.component.spec.ts  (dspace-angular-dspace-7.1)
import { ItemVersionHistoryComponent } from './item-version-history.component'; import { ItemVersionHistoryComponent } from './item-version-history.component';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { VarDirective } from '../../../shared/utils/var.directive'; import { VarDirective } from '../../../shared/utils/var.directive';
import { RouterTestingModule } from '@angular/router/testing'; import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NO_ERRORS_SCHEMA } from '@angular/core';
import { Item } from '../../../core/shared/item.model'; import { Item } from '../../../core/shared/item.model';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.ut ils'; import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.ut ils';
describe('ItemVersionHistoryComponent', () => { describe('ItemVersionHistoryComponent', () => {
let component: ItemVersionHistoryComponent; let component: ItemVersionHistoryComponent;
let fixture: ComponentFixture<ItemVersionHistoryComponent>; let fixture: ComponentFixture<ItemVersionHistoryComponent>;
const item = Object.assign(new Item(), { const item = Object.assign(new Item(), {
uuid: 'item-identifier-1', uuid: 'item-identifier-1',
handle: '123456789/1', handle: '123456789/1',
}); });
const activatedRoute = {
parent: {
parent: {
data: observableOf({dso: createSuccessfulRemoteDataObject(item)})
}
}
};
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ItemVersionHistoryComponent, VarDirective], declarations: [ItemVersionHistoryComponent, VarDirective],
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
providers: [ providers: [
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ ds o: createSuccessfulRemoteDataObject(item) }) } } } { provide: ActivatedRoute, useValue: activatedRoute }
], ],
schemas: [NO_ERRORS_SCHEMA] schemas: [NO_ERRORS_SCHEMA]
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ItemVersionHistoryComponent); fixture = TestBed.createComponent(ItemVersionHistoryComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)