Fix CollectionSearchResultListElementComponent no expectation tests

- Wrong css class was used
- The check to see if the offset was defined did not exist
This commit is contained in:
Alexandre Vryghem
2023-07-01 13:19:28 +02:00
parent abc8640b5e
commit e0db4284b3

View File

@@ -1,7 +1,7 @@
import { CollectionSearchResultListElementComponent } from './collection-search-result-list-element.component'; import { CollectionSearchResultListElementComponent } from './collection-search-result-list-element.component';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core'; import { ChangeDetectionStrategy, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { TruncatePipe } from '../../../utils/truncate.pipe'; import { TruncatePipe } from '../../../utils/truncate.pipe';
import { Collection } from '../../../../core/shared/collection.model'; import { Collection } from '../../../../core/shared/collection.model';
@@ -98,7 +98,8 @@ describe('CollectionSearchResultListElementComponent', () => {
describe('when environment is set to show thumbnail images', () => { describe('when environment is set to show thumbnail images', () => {
it('should offset content', () => { it('should offset content', () => {
const offset = fixture.debugElement.query(By.css('offset-md-2')); const offset: DebugElement = fixture.debugElement.query(By.css('.offset-md-2'));
expect(offset).not.toBeNull();
}); });
}); });