mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
68405: More test fixes
This commit is contained in:

committed by
Art Lowel

parent
fb153b7b13
commit
be0158fc9c
@@ -26,14 +26,22 @@ describe('GridThumbnailComponent', () => {
|
||||
});
|
||||
|
||||
it('should display image', () => {
|
||||
comp.thumbnail = new Bitstream();
|
||||
comp.thumbnail._links.content.href = 'test.url';
|
||||
const thumbnail = new Bitstream();
|
||||
thumbnail._links = {
|
||||
self: { href: 'self.url' },
|
||||
bundle: { href: 'bundle.url' },
|
||||
format: { href: 'format.url' },
|
||||
content: { href: 'content.url' },
|
||||
};
|
||||
comp.thumbnail = thumbnail;
|
||||
fixture.detectChanges();
|
||||
const image: HTMLElement = de.query(By.css('img')).nativeElement;
|
||||
expect(image.getAttribute('src')).toBe(comp.thumbnail._links.content.href);
|
||||
});
|
||||
|
||||
it('should display placeholder', () => {
|
||||
const thumbnail = new Bitstream();
|
||||
comp.thumbnail = thumbnail;
|
||||
fixture.detectChanges();
|
||||
const image: HTMLElement = de.query(By.css('img')).nativeElement;
|
||||
expect(image.getAttribute('src')).toBe(comp.defaultImage);
|
||||
|
Reference in New Issue
Block a user