Fix CommunitySearchResultListElementComponent 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:49:07 +02:00
parent 9d71171741
commit a524805faf

View File

@@ -1,7 +1,7 @@
import { CommunitySearchResultListElementComponent } from './community-search-result-list-element.component';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
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 { TruncatePipe } from '../../../utils/truncate.pipe';
import { Community } from '../../../../core/shared/community.model';
@@ -99,7 +99,8 @@ describe('CommunitySearchResultListElementComponent', () => {
describe('when environment is set to show thumbnail images', () => {
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();
});
});
});