diff --git a/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue b/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue index 074aa9dbac..c7cfb82d43 100644 --- a/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue +++ b/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue @@ -20,8 +20,10 @@ v-if="showFilters" id="content-settings" size="medium" - class="category me-4" - >{{ $t("search-type.heading") }}{{ + $t("search-type.heading") + }}

{{ $t("search-type.heading") }}

- {{ - $t("filters.title") - }} + + {{ $t("filters.title") }} { - const selector = buttonSelectors.mobileContentSettings + const selector = "#content-settings-button" await ensureButtonPressed(page, selector) diff --git a/test/playwright/visual-regression/components/filters-sidebar.spec.ts b/test/playwright/visual-regression/components/filters-sidebar.spec.ts deleted file mode 100644 index 41039acc1a..0000000000 --- a/test/playwright/visual-regression/components/filters-sidebar.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from "@playwright/test" - -import { - goToSearchTerm, - languageDirections, -} from "~~/test/playwright/utils/navigation" - -test.describe.configure({ mode: "parallel" }) - -for (const dir of languageDirections) { - test(`Filters sidebar none selected - ${dir}`, async ({ page }) => { - await goToSearchTerm(page, "birds", { dir }) - - expect(await page.locator(".sidebar").screenshot()).toMatchSnapshot({ - name: `filters-sidebar-${dir}.png`, - }) - }) - test(`Filters sidebar some filters selected - ${dir}`, async ({ page }) => { - await goToSearchTerm(page, "birds", { dir }) - await page.locator('input[type="checkbox"]').first().check() - - expect(await page.locator(".sidebar").screenshot()).toMatchSnapshot({ - name: `filters-sidebar-filters-selected-${dir}.png`, - }) - }) -} diff --git a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-rtl-linux.png b/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-rtl-linux.png deleted file mode 100644 index 3c3b225f15..0000000000 Binary files a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-rtl-linux.png and /dev/null differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts b/test/playwright/visual-regression/components/filters.spec.ts new file mode 100644 index 0000000000..cafe1f8d15 --- /dev/null +++ b/test/playwright/visual-regression/components/filters.spec.ts @@ -0,0 +1,60 @@ +import { expect, test } from "@playwright/test" + +import { + enableNewHeader, + goToSearchTerm, + languageDirections, + t, +} from "~~/test/playwright/utils/navigation" +import breakpoints from "~~/test/playwright/utils/breakpoints" + +test.describe.configure({ mode: "parallel" }) + +for (const dir of languageDirections) { + breakpoints.describeEachDesktop(() => { + test(`Filters sidebar none selected - ${dir}`, async ({ page }) => { + await enableNewHeader(page) + + await goToSearchTerm(page, "birds", { dir }) + + expect(await page.locator(".sidebar").screenshot()).toMatchSnapshot( + `filters-sidebar-${dir}.png` + ) + }) + + test(`Filters sidebar some filters selected - ${dir}`, async ({ page }) => { + await enableNewHeader(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 enableNewHeader(page) + + await goToSearchTerm(page, "birds", { dir }) + await page.getByRole("button", { name: "Menu" }).click() + await page.getByRole("tab", { name: t("filters.title", dir) }).click() + + await expectSnapshot(`filters-modal-${dir}.png`, page) + }) + + test(`Filters modal some filters selected - ${dir}`, async ({ page }) => { + await enableNewHeader(page) + + await goToSearchTerm(page, "birds", { dir }) + await page.getByRole("button", { name: "Menu" }).click() + await page.getByRole("tab", { name: t("filters.title", dir) }).click() + + await page.locator('input[type="checkbox"]').first().check() + + await expectSnapshot(`filters-modal-filters-selected-${dir}.png`, page) + }) + }) +} diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-md-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-md-linux.png new file mode 100644 index 0000000000..0de0b0cc86 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-md-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-sm-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-sm-linux.png new file mode 100644 index 0000000000..3f251c48f0 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-sm-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-xs-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-xs-linux.png new file mode 100644 index 0000000000..58a652b2ef Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-ltr-png-xs-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-md-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-md-linux.png new file mode 100644 index 0000000000..91415dde9d Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-md-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-sm-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-sm-linux.png new file mode 100644 index 0000000000..d834730eb3 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-sm-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-xs-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-xs-linux.png new file mode 100644 index 0000000000..0ed087a304 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-filters-selected-rtl-png-xs-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-md-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-md-linux.png new file mode 100644 index 0000000000..45f78702dd Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-md-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-sm-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-sm-linux.png new file mode 100644 index 0000000000..680a0c33b7 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-sm-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-xs-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-xs-linux.png new file mode 100644 index 0000000000..2254f9d6b6 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-ltr-png-xs-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-md-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-md-linux.png new file mode 100644 index 0000000000..fa643459f3 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-md-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-sm-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-sm-linux.png new file mode 100644 index 0000000000..8e1185f05a Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-sm-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-xs-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-xs-linux.png new file mode 100644 index 0000000000..aae2f4e0cb Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-modal-rtl-png-xs-linux.png differ diff --git a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-ltr-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-ltr-linux.png similarity index 99% rename from test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-ltr-linux.png rename to test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-ltr-linux.png index 25ed682f03..d96a8d5cc8 100644 Binary files a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-filters-selected-ltr-linux.png and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-ltr-linux.png differ diff --git a/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-rtl-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-rtl-linux.png new file mode 100644 index 0000000000..b7904e01d8 Binary files /dev/null and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-checked-rtl-linux.png differ diff --git a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-ltr-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-ltr-linux.png similarity index 55% rename from test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-ltr-linux.png rename to test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-ltr-linux.png index 1b0df27b21..c9f4520958 100644 Binary files a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-ltr-linux.png and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-ltr-linux.png differ diff --git a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-rtl-linux.png b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-rtl-linux.png similarity index 60% rename from test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-rtl-linux.png rename to test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-rtl-linux.png index c5e012077e..5ee951e360 100644 Binary files a/test/playwright/visual-regression/components/filters-sidebar.spec.ts-snapshots/filters-sidebar-rtl-linux.png and b/test/playwright/visual-regression/components/filters.spec.ts-snapshots/filters-sidebar-rtl-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-md-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-md-linux.png index 7de8abb2e8..bf766a8c86 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-md-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-md-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-sm-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-sm-linux.png index 9c7f96a94e..a36297f339 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-sm-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-sm-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-xs-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-xs-linux.png index 67a7e362ac..7bf6db721b 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-xs-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-open-ltr-xs-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-md-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-md-linux.png index 22e912315f..6130475bfd 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-md-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-md-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-sm-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-sm-linux.png index 4d85e55357..5969f7cd6f 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-sm-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-sm-linux.png differ diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-xs-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-xs-linux.png index 051c8c6573..989073ad19 100644 Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-xs-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/content-switcher-with-external-sources-open-ltr-xs-linux.png differ