Skip to content

Commit

Permalink
Reduce the impact of the filters on the page
Browse files Browse the repository at this point in the history
Refs #1712
  • Loading branch information
thewilkybarkid committed May 28, 2024
1 parent 962d57b commit 824a432
Show file tree
Hide file tree
Showing 82 changed files with 168 additions and 168 deletions.
12 changes: 6 additions & 6 deletions integration/requesting-a-prereview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/review-requests-page/review-requests-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const form = ({ field, language }: Pick<ReviewRequests, 'field' | 'language'>) =
<h2 class="visually-hidden" id="filter-label">Filter</h2>
<input type="hidden" name="page" value="1" />
<div>
<label for="language">Filter by language</label>
<label for="language">Language</label>
<select name="language" id="language">
<option value="" ${language === undefined ? html`selected` : ''}>Any</option>
${pipe(
Expand All @@ -167,7 +167,7 @@ const form = ({ field, language }: Pick<ReviewRequests, 'field' | 'language'>) =
</select>
</div>
<div>
<label for="field">Filter by field</label>
<label for="field">Field</label>
<select name="field" id="field">
<option value="" ${field === undefined ? html`selected` : ''}>Any</option>
${pipe(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 824a432

Please sign in to comment.