Commits

noltrifork authored edba118a375
DGAF-2240, Forløbsplan scroller default ned til kommende aftale nummer to i stedet for til førstkommende aftale
No tags

src/app/activities/activities.component.spec.ts

Modified
132 132 it('should add an undefined activity', () => {
133 133 const spy = spyOn(activitiesServiceStub, 'emitOpenActivityModalEvent').and.callThrough();
134 134 component.addActivity();
135 135 expect(spy).toHaveBeenCalledWith(undefined);
136 136 });
137 137 it('should scroll future activities into view', fakeAsync(() => {
138 138 // assuming that env is set and ready
139 139 fixture.detectChanges();
140 140 component.upcomingActivities = {
141 141 nativeElement: {
142 - scrollIntoView: () => 'keep scrolling'
142 + getBoundingClientRect: () => ({ top: 0 }),
143 143 }
144 144 };
145 - const spy = spyOn(component.upcomingActivities.nativeElement, 'scrollIntoView').and.callThrough();
145 + const spy = spyOn(window, 'scrollTo').and.callThrough();
146 146 component.scrollToActivities();
147 147 tick(500);
148 148 fixture.detectChanges();
149 149 expect(spy).toHaveBeenCalled();
150 150 }));
151 151 });

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut