From bba69714401025d94e5eebb166f638127ef670ed Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sun, 18 Feb 2024 21:42:49 +0100 Subject: [PATCH] Fixed new failing tests --- .../community-page-sub-collection-list.component.spec.ts | 4 ++-- .../community-page-sub-community-list.component.spec.ts | 4 ++-- src/app/shared/object-list/object-list.component.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.spec.ts b/src/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.spec.ts index 88b397ff36..2655753021 100644 --- a/src/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.spec.ts +++ b/src/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; @@ -183,7 +183,7 @@ describe('CommunityPageSubCollectionListComponent', () => { await fixture.whenStable(); fixture.detectChanges(); - const collList = fixture.debugElement.queryAll(By.css('li')); + const collList: DebugElement[] = fixture.debugElement.queryAll(By.css('ul[data-test="objects"] li')); expect(collList.length).toEqual(5); expect(collList[0].nativeElement.textContent).toContain('Collection 1'); expect(collList[1].nativeElement.textContent).toContain('Collection 2'); diff --git a/src/app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.spec.ts b/src/app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.spec.ts index d829e0c66f..a51f09d7a5 100644 --- a/src/app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.spec.ts +++ b/src/app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; import { RouterTestingModule } from '@angular/router/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { By } from '@angular/platform-browser'; @@ -185,7 +185,7 @@ describe('CommunityPageSubCommunityListComponent', () => { await fixture.whenStable(); fixture.detectChanges(); - const subComList = fixture.debugElement.queryAll(By.css('li')); + const subComList: DebugElement[] = fixture.debugElement.queryAll(By.css('ul[data-test="objects"] li')); expect(subComList.length).toEqual(5); expect(subComList[0].nativeElement.textContent).toContain('SubCommunity 1'); expect(subComList[1].nativeElement.textContent).toContain('SubCommunity 2'); diff --git a/src/app/shared/object-list/object-list.component.html b/src/app/shared/object-list/object-list.component.html index b8712b85c5..5fe57e1369 100644 --- a/src/app/shared/object-list/object-list.component.html +++ b/src/app/shared/object-list/object-list.component.html @@ -15,7 +15,7 @@ (paginationChange)="onPaginationChange($event)" (prev)="goPrev()" (next)="goNext()"> -