Commits

Alisa Ismailati authored e7579b7bf57
[CST-12109] fix of text messages / source image
No tags

src/app/item-page/alerts/item-alerts.component.spec.ts

Modified
102 102 component.item = item;
103 103 fixture.detectChanges();
104 104 });
105 105
106 106 it('should not display the withdrawn alert', () => {
107 107 const privateWarning = fixture.debugElement.query(By.css('.withdrawn-warning'));
108 108 expect(privateWarning).toBeNull();
109 109 });
110 110 });
111 111
112 - it('should return true when user is not an admin and there is at least one correction with topic REQUEST_REINSTATE', fakeAsync(() => {
112 + it('should return true when user is not an admin and there is at least one correction with topic REQUEST_REINSTATE', fakeAsync((done) => {
113 113 const isAdmin = false;
114 114 const correction = [{ topic: 'REQUEST_REINSTATE' }];
115 115 authorizationService.isAuthorized.and.returnValue(of(isAdmin));
116 116 correctionTypeDataService.findByItem.and.returnValue(of(correction));
117 117
118 118 const result$ = component.showReinstateButton$();
119 119 tick();
120 120 result$.subscribe((result) => {
121 121 expect(result).toBeTrue();
122 + done();
122 123 });
123 124 }));
124 125 });

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

Add shortcut