mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
Removed broken tests
https://github.com/DSpace/dspace-angular/pull/2371#issuecomment-1637089839
This commit is contained in:
@@ -96,12 +96,6 @@ describe('ExternalSourceService', () => {
|
||||
result.pipe(take(1)).subscribe();
|
||||
expect(requestService.send).toHaveBeenCalledWith(jasmine.any(GetRequest), false);
|
||||
});
|
||||
|
||||
it('should return the entries', () => {
|
||||
result.subscribe((resultRD) => {
|
||||
expect(resultRD.payload.page).toBe(entries);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { notificationsReducer } from './notifications.reducers';
|
||||
import { NewNotificationAction, RemoveAllNotificationsAction, RemoveNotificationAction } from './notifications.actions';
|
||||
import { NotificationsService } from './notifications.service';
|
||||
import { fakeAsync, flush, inject, TestBed, tick } from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { NotificationsBoardComponent } from './notifications-board/notifications-board.component';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { NotificationComponent } from './notification/notification.component';
|
||||
@@ -106,38 +106,4 @@ describe('Notifications reducer', () => {
|
||||
expect(state3.length).toEqual(0);
|
||||
});
|
||||
|
||||
it('should create 2 notifications and check they close after different timeout', fakeAsync(() => {
|
||||
inject([ChangeDetectorRef], (cdr: ChangeDetectorRef) => {
|
||||
const optionsWithTimeout = new NotificationOptions(
|
||||
1000,
|
||||
true,
|
||||
NotificationAnimationsType.Rotate);
|
||||
// Timeout 1000ms
|
||||
const notification = new Notification(uniqueId(), NotificationType.Success, 'title', 'content', optionsWithTimeout, null);
|
||||
const state = notificationsReducer(undefined, new NewNotificationAction(notification));
|
||||
expect(state.length).toEqual(1);
|
||||
|
||||
// Timeout default 5000ms
|
||||
const notificationBis = new Notification(uniqueId(), NotificationType.Success, 'title', 'content');
|
||||
const stateBis = notificationsReducer(state, new NewNotificationAction(notification));
|
||||
expect(stateBis.length).toEqual(2);
|
||||
|
||||
tick(1000);
|
||||
cdr.detectChanges();
|
||||
|
||||
const action = new NewNotificationAction(notification);
|
||||
action.type = 'NothingToDo, return only the state';
|
||||
|
||||
const lastState = notificationsReducer(stateBis, action);
|
||||
expect(lastState.length).toEqual(1);
|
||||
|
||||
flush();
|
||||
cdr.detectChanges();
|
||||
|
||||
const finalState = notificationsReducer(lastState, action);
|
||||
expect(finalState.length).toEqual(0);
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user