From 824a43201bf58fc18230379da3f9965fa928ec22 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Tue, 28 May 2024 15:37:52 +0100 Subject: [PATCH] Reduce the impact of the filters on the page Refs #1712 --- integration/requesting-a-prereview.spec.ts | 12 ++++++------ src/review-requests-page/review-requests-page.ts | 4 ++-- ...page-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...age-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...ddle-page-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...page-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...age-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...last-page-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...ight-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...ght-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...oks-right-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...mpty-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...pty-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...hen-empty-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...ield-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...eld-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...h-a-field-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...uage-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...age-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-language-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...ield-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...eld-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...h-a-field-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...uage-1-Desktop-Chrome-Visual-Regression-linux.png | 4 ++-- ...Chrome-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...age-1-Desktop-Firefox-Visual-Regression-linux.png | 4 ++-- ...irefox-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-Chrome-high-contrast-Visual-Regression-linux.png | 4 ++-- ...ntrast-Visual-Regression-no-JavaScript--linux.png | 4 ++-- ...-language-1-iPhone-11-Visual-Regression-linux.png | 4 ++-- ...one-11-Visual-Regression-no-JavaScript--linux.png | 4 ++-- 82 files changed, 168 insertions(+), 168 deletions(-) diff --git a/integration/requesting-a-prereview.spec.ts b/integration/requesting-a-prereview.spec.ts index 4ae88a569..d9f66bafe 100644 --- a/integration/requesting-a-prereview.spec.ts +++ b/integration/requesting-a-prereview.spec.ts @@ -388,13 +388,13 @@ test('can view an older request in a specific language', async ({ page }) => { const filters = page.getByRole('search', { name: 'Filter' }) await expect(page).toHaveTitle('Recent review requests (page 1) | PREreview') - await expect(filters.getByLabel('Filter by language').locator('[selected]')).toHaveText('Any') + await expect(filters.getByLabel('Language').locator('[selected]')).toHaveText('Any') - await filters.getByLabel('Filter by language').selectOption('English') + await filters.getByLabel('Language').selectOption('English') await filters.getByRole('button', { name: 'Filter results' }).click() await expect(page).toHaveTitle('Recent review requests (English, page 1) | PREreview') - await expect(filters.getByLabel('Filter by language').locator('[selected]')).toHaveText('English') + await expect(filters.getByLabel('Language').locator('[selected]')).toHaveText('English') await expect( page.getByRole('link', { name: 'A conserved local structural motif controls the kinetics of PTP1B catalysis' }), ).toBeHidden() @@ -413,13 +413,13 @@ test('can view an older request in a specific field', async ({ page }) => { const filters = page.getByRole('search', { name: 'Filter' }) await expect(page).toHaveTitle('Recent review requests (page 1) | PREreview') - await expect(filters.getByLabel('Filter by field').locator('[selected]')).toHaveText('Any') + await expect(filters.getByLabel('Field').locator('[selected]')).toHaveText('Any') - await filters.getByLabel('Filter by field').selectOption('Immunology and Microbiology') + await filters.getByLabel('Field').selectOption('Immunology and Microbiology') await filters.getByRole('button', { name: 'Filter results' }).click() await expect(page).toHaveTitle('Recent review requests (Immunology and Microbiology, page 1) | PREreview') - await expect(filters.getByLabel('Filter by field').locator('[selected]')).toHaveText('Immunology and Microbiology') + await expect(filters.getByLabel('Field').locator('[selected]')).toHaveText('Immunology and Microbiology') await expect( page.getByRole('link', { name: 'The role of LHCBM1 in non-photochemical quenching in Chlamydomonas reinhardtii' }), ).toBeHidden() diff --git a/src/review-requests-page/review-requests-page.ts b/src/review-requests-page/review-requests-page.ts index d1a304d80..e266c19dd 100644 --- a/src/review-requests-page/review-requests-page.ts +++ b/src/review-requests-page/review-requests-page.ts @@ -152,7 +152,7 @@ const form = ({ field, language }: Pick) =

Filter

- +
- +