-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent hovering in the external-sources VR test (#2666)
* Prevent hovering in the external-sources VR test * Update snapshots * Remove flakiness from filters tests * Remove flakiness from filters tests * Remove flakiness from filters tests
- Loading branch information
Showing
36 changed files
with
16,920 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-19.6 KB
...al-sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-linux.png
Binary file not shown.
Binary file modified
BIN
-13 Bytes
(100%)
...sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-45 Bytes
(100%)
...sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-18.1 KB
...al-sources-section.spec.ts-snapshots/external-all-sources-popover-rtl-linux.png
Binary file not shown.
Binary file modified
BIN
-311 Bytes
(98%)
...sources-section.spec.ts-snapshots/external-all-sources-popover-rtl-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-54 Bytes
(100%)
...sources-section.spec.ts-snapshots/external-all-sources-popover-rtl-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-11.1 KB
...-sources-section.spec.ts-snapshots/external-audio-sources-popover-ltr-linux.png
Binary file not shown.
Binary file modified
BIN
-268 Bytes
(98%)
...urces-section.spec.ts-snapshots/external-audio-sources-popover-ltr-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-18 Bytes
(100%)
...urces-section.spec.ts-snapshots/external-audio-sources-popover-ltr-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-9.52 KB
...-sources-section.spec.ts-snapshots/external-audio-sources-popover-rtl-linux.png
Binary file not shown.
Binary file modified
BIN
-108 Bytes
(99%)
...urces-section.spec.ts-snapshots/external-audio-sources-popover-rtl-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-37 Bytes
(100%)
...urces-section.spec.ts-snapshots/external-audio-sources-popover-rtl-xl-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-19.6 KB
...-sources-section.spec.ts-snapshots/external-image-sources-popover-ltr-linux.png
Binary file not shown.
Binary file modified
BIN
-98 Bytes
(100%)
...urces-section.spec.ts-snapshots/external-image-sources-popover-ltr-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-18.1 KB
...-sources-section.spec.ts-snapshots/external-image-sources-popover-rtl-linux.png
Binary file not shown.
Binary file modified
BIN
-155 Bytes
(99%)
...urces-section.spec.ts-snapshots/external-image-sources-popover-rtl-sm-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 39 additions & 42 deletions
81
frontend/test/playwright/visual-regression/components/filters.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,50 @@ | ||
import { expect, Page, test } from "@playwright/test" | ||
import { test } from "@playwright/test" | ||
|
||
import { | ||
goToSearchTerm, | ||
dismissAllBannersUsingCookies, | ||
filters, | ||
languageDirections, | ||
pathWithDir, | ||
setBreakpointCookie, | ||
} from "~~/test/playwright/utils/navigation" | ||
import breakpoints from "~~/test/playwright/utils/breakpoints" | ||
|
||
import type { Breakpoint } from "~/constants/screens" | ||
|
||
test.describe.configure({ mode: "parallel" }) | ||
|
||
const openFiltersTab = async (page: Page) => { | ||
await page.locator("#content-settings-button").click() | ||
await page.getByRole("tab").last().click() | ||
} | ||
const getFiltersName = (breakpoint: Breakpoint) => | ||
breakpoint === "lg" ? "filters-sidebar" : "filters-modal" | ||
|
||
for (const dir of languageDirections) { | ||
breakpoints.describeEachDesktop(() => { | ||
test(`Filters sidebar none selected - ${dir}`, async ({ page }) => { | ||
await goToSearchTerm(page, "birds", { dir }) | ||
|
||
expect(await page.locator(".sidebar").screenshot()).toMatchSnapshot( | ||
`filters-sidebar-${dir}.png` | ||
) | ||
}) | ||
|
||
test(`Filters sidebar 1 filter selected - ${dir}`, async ({ page }) => { | ||
await goToSearchTerm(page, "birds", { dir }) | ||
await page.locator('input[type="checkbox"]').first().check() | ||
|
||
expect(await page.locator(".sidebar").screenshot()).toMatchSnapshot( | ||
`filters-sidebar-checked-${dir}.png` | ||
) | ||
}) | ||
}) | ||
|
||
breakpoints.describeEachMobile(({ expectSnapshot }) => { | ||
test(`Filters modal none selected - ${dir}`, async ({ page }) => { | ||
await goToSearchTerm(page, "birds", { dir }) | ||
await openFiltersTab(page) | ||
|
||
await expectSnapshot(`filters-modal-${dir}.png`, page) | ||
}) | ||
|
||
test(`Filters modal 1 filter selected - ${dir}`, async ({ page }) => { | ||
await goToSearchTerm(page, "birds", { dir }) | ||
await openFiltersTab(page) | ||
|
||
await page.locator('input[type="checkbox"]').first().check() | ||
|
||
await expectSnapshot(`filters-modal-filters-selected-${dir}.png`, page) | ||
}) | ||
}) | ||
breakpoints.describeEachBreakpoint(["xs", "sm", "md", "lg"])( | ||
({ breakpoint, expectSnapshot }) => { | ||
const isDesktop = breakpoint === "lg" | ||
test.beforeEach(async ({ page }) => { | ||
await setBreakpointCookie(page, breakpoint) | ||
await dismissAllBannersUsingCookies(page) | ||
await page.goto(pathWithDir("/search/?q=birds", dir)) | ||
await filters.open(page, dir) | ||
}) | ||
test(`Filters modal none selected - ${dir}`, async ({ page }) => { | ||
const snapshotName = `${getFiltersName(breakpoint)}-${dir}` | ||
|
||
await expectSnapshot( | ||
snapshotName, | ||
isDesktop ? page.locator(".sidebar") : page | ||
) | ||
}) | ||
|
||
test(`Filters modal 1 filter selected - ${dir}`, async ({ page }) => { | ||
await page.locator('input[type="checkbox"]').first().check() | ||
|
||
const snapshotName = `${getFiltersName(breakpoint)}-checked-${dir}` | ||
|
||
await expectSnapshot( | ||
snapshotName, | ||
isDesktop ? page.locator(".sidebar") : page | ||
) | ||
}) | ||
} | ||
) | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.