From 4ba7a53cbd93f007aa4a30e5294f53a47825e807 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Wed, 24 Jan 2024 11:07:34 +0000 Subject: [PATCH 1/6] fix for failing thumbnail test post accessibility changes --- src/app/thumbnail/thumbnail.component.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/thumbnail/thumbnail.component.spec.ts b/src/app/thumbnail/thumbnail.component.spec.ts index ebecb5e075b..bf3f24f6050 100644 --- a/src/app/thumbnail/thumbnail.component.spec.ts +++ b/src/app/thumbnail/thumbnail.component.spec.ts @@ -227,7 +227,7 @@ describe('ThumbnailComponent', () => { fixture.detectChanges(); const image: HTMLElement = fixture.debugElement.query(By.css('img')).nativeElement; - expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt); + expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt + ' for PDF'); }); }); @@ -271,7 +271,7 @@ describe('ThumbnailComponent', () => { comp.ngOnChanges({}); fixture.detectChanges(); const image: HTMLElement = fixture.debugElement.query(By.css('img')).nativeElement; - expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt); + expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt + ' for PDF'); }); }); @@ -311,7 +311,7 @@ describe('ThumbnailComponent', () => { comp.ngOnChanges({}); fixture.detectChanges(); const image: HTMLElement = de.query(By.css('img')).nativeElement; - expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt); + expect(image.getAttribute('alt')).toBe('TRANSLATED ' + comp.alt + ' for PDF'); }); }); From e0b5a6bf03bf5a59c282e06bad292ef2a5820086 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Wed, 24 Jan 2024 11:42:25 +0000 Subject: [PATCH 2/6] fix for failing full page table test post accessibility changes --- src/app/item-page/full/full-item-page.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/item-page/full/full-item-page.component.spec.ts b/src/app/item-page/full/full-item-page.component.spec.ts index 9fc078c2cd7..15d37cf5d04 100644 --- a/src/app/item-page/full/full-item-page.component.spec.ts +++ b/src/app/item-page/full/full-item-page.component.spec.ts @@ -141,7 +141,7 @@ describe('FullItemPageComponent', () => { }); it('should display the item\'s metadata', () => { - const table = fixture.debugElement.query(By.css('table')); + const table = fixture.debugElement.query(By.css('div.table-responsive')); for (const metadatum of mockItem.allMetadata(Object.keys(mockItem.metadata))) { expect(table.nativeElement.innerHTML).toContain(metadatum.value); } From 0ff1bdf405adc6c28ed4188dadb89baae77d3227 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Wed, 24 Jan 2024 15:52:46 +0000 Subject: [PATCH 3/6] fix for failing full page table test post accessibility changes --- src/app/item-page/full/full-item-page.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/item-page/full/full-item-page.component.spec.ts b/src/app/item-page/full/full-item-page.component.spec.ts index 9fc078c2cd7..15d37cf5d04 100644 --- a/src/app/item-page/full/full-item-page.component.spec.ts +++ b/src/app/item-page/full/full-item-page.component.spec.ts @@ -141,7 +141,7 @@ describe('FullItemPageComponent', () => { }); it('should display the item\'s metadata', () => { - const table = fixture.debugElement.query(By.css('table')); + const table = fixture.debugElement.query(By.css('div.table-responsive')); for (const metadatum of mockItem.allMetadata(Object.keys(mockItem.metadata))) { expect(table.nativeElement.innerHTML).toContain(metadatum.value); } From 34876242e7dc29dacea947233bd589885cec7e95 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Wed, 24 Jan 2024 15:54:56 +0000 Subject: [PATCH 4/6] fix for failing sidebar test post accessibility changes --- src/app/admin/admin-sidebar/admin-sidebar.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.html b/src/app/admin/admin-sidebar/admin-sidebar.component.html index 95b154f8f98..442a9cf25f7 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.html +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.html @@ -34,11 +34,11 @@

{{ 'menu.header.admin' | translate }}

From 42c8afe75da163fcf91f215ad40719d058412a00 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Fri, 8 Mar 2024 11:14:46 +0000 Subject: [PATCH 5/6] fix for failing statistcis table test post accessibility changes --- .../statistics-table.component.spec.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts index c7900cd2785..dcb81691fc0 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts +++ b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts @@ -78,20 +78,20 @@ describe('StatisticsTableComponent', () => { it ('should display a table with the correct data', () => { - expect(de.query(By.css('table'))).toBeTruthy(); + expect(de.query(By.css('div.table'))).toBeTruthy(); - expect(de.query(By.css('th.views-header')).nativeElement.innerText) + expect(de.query(By.css('div.views-header')).nativeElement.innerText) .toEqual('views'); - expect(de.query(By.css('th.downloads-header')).nativeElement.innerText) + expect(de.query(By.css('div..downloads-header')).nativeElement.innerText) .toEqual('downloads'); - expect(de.query(By.css('td.item_1-views-data')).nativeElement.innerText) + expect(de.query(By.css('div.item_1-views-data')).nativeElement.innerText) .toEqual('7'); - expect(de.query(By.css('td.item_1-downloads-data')).nativeElement.innerText) + expect(de.query(By.css('div.item_1-downloads-data')).nativeElement.innerText) .toEqual('4'); - expect(de.query(By.css('td.item_2-views-data')).nativeElement.innerText) + expect(de.query(By.css('div.item_2-views-data')).nativeElement.innerText) .toEqual('8'); - expect(de.query(By.css('td.item_2-downloads-data')).nativeElement.innerText) + expect(de.query(By.css('div.item_2-downloads-data')).nativeElement.innerText) .toEqual('8'); }); }); From 407ded02038e33b32dfa24bb8741133e579c4730 Mon Sep 17 00:00:00 2001 From: Ben Parkes Date: Wed, 13 Mar 2024 17:00:36 +0000 Subject: [PATCH 6/6] fix for failing statistcis table test post accessibility changes --- .../statistics-table/statistics-table.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts index dcb81691fc0..cba8c5442d2 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts +++ b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts @@ -82,7 +82,7 @@ describe('StatisticsTableComponent', () => { expect(de.query(By.css('div.views-header')).nativeElement.innerText) .toEqual('views'); - expect(de.query(By.css('div..downloads-header')).nativeElement.innerText) + expect(de.query(By.css('div.downloads-header')).nativeElement.innerText) .toEqual('downloads'); expect(de.query(By.css('div.item_1-views-data')).nativeElement.innerText)