From bef7359f8010628cc2984022354294db00a1d08f Mon Sep 17 00:00:00 2001 From: anton202 Date: Sun, 15 Jan 2023 14:43:10 +0200 Subject: [PATCH 1/3] add hover state for play-pause button --- src/components/VAudioTrack/layouts/VBoxLayout.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/VAudioTrack/layouts/VBoxLayout.vue b/src/components/VAudioTrack/layouts/VBoxLayout.vue index e168d1a424..f32eee0f73 100644 --- a/src/components/VAudioTrack/layouts/VBoxLayout.vue +++ b/src/components/VAudioTrack/layouts/VBoxLayout.vue @@ -98,6 +98,10 @@ export default defineComponent({ @apply border-yellow bg-yellow text-dark-charcoal focus:border-pink; } +.play-pause:hover { + @apply bg-dark-charcoal text-white; +} + .box-track .waveform { @apply h-10; } From 5e38e444c7201ae52b7c5ffe1681d48532b11356 Mon Sep 17 00:00:00 2001 From: Zack Krida Date: Tue, 24 Jan 2023 16:36:54 +0300 Subject: [PATCH 2/3] Add border color --- src/components/VAudioTrack/layouts/VBoxLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VAudioTrack/layouts/VBoxLayout.vue b/src/components/VAudioTrack/layouts/VBoxLayout.vue index f32eee0f73..6372164920 100644 --- a/src/components/VAudioTrack/layouts/VBoxLayout.vue +++ b/src/components/VAudioTrack/layouts/VBoxLayout.vue @@ -99,7 +99,7 @@ export default defineComponent({ } .play-pause:hover { - @apply bg-dark-charcoal text-white; + @apply border-dark-charcoal bg-dark-charcoal text-white; } .box-track .waveform { From 420df7ce8423319b542cc341806d857e2045d7b2 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Tue, 31 Jan 2023 09:12:31 +0300 Subject: [PATCH 3/3] Update tests --- test/playwright/e2e/homepage.spec.ts | 4 ++-- .../playwright/e2e/translation-banner.spec.ts | 21 ++++++++++--------- test/playwright/utils/navigation.ts | 11 ++-------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/test/playwright/e2e/homepage.spec.ts b/test/playwright/e2e/homepage.spec.ts index b1e27c3c4f..a62c7bc43f 100644 --- a/test/playwright/e2e/homepage.spec.ts +++ b/test/playwright/e2e/homepage.spec.ts @@ -12,15 +12,15 @@ import { supportedSearchTypes } from "~/constants/media" test.describe.configure({ mode: "parallel" }) -test.beforeEach(async ({ context }) => { +test.beforeEach(async ({ context, page }) => { await mockProviderApis(context) + await enableNewHeader(page) }) for (const searchType of supportedSearchTypes) { test(`can change type and search for ${searchType} from homepage`, async ({ page, }) => { - await enableNewHeader(page) await goToSearchTerm(page, "cat", { searchType, mode: "CSR", diff --git a/test/playwright/e2e/translation-banner.spec.ts b/test/playwright/e2e/translation-banner.spec.ts index 965e48142c..1c747115c3 100644 --- a/test/playwright/e2e/translation-banner.spec.ts +++ b/test/playwright/e2e/translation-banner.spec.ts @@ -1,16 +1,21 @@ import { test, expect } from "@playwright/test" -import { enableNewHeader } from "~~/test/playwright/utils/navigation" +import { + enableNewHeader, + setCookies, +} from "~~/test/playwright/utils/navigation" const russianSearchPath = "/ru/search?q=dog" test.describe.configure({ mode: "parallel" }) test.describe("translation banner", () => { + test.beforeEach(async ({ page }) => { + await enableNewHeader(page) + }) test("Can see the translation banner and go to the correct link", async ({ page, }) => { - await enableNewHeader(page) await page.goto(russianSearchPath) await expect( page.locator( @@ -30,14 +35,10 @@ test.describe("translation banner", () => { test("Banner is not shown if dismissed state is saved in a cookie", async ({ page, }) => { - await page.context().addCookies([ - { - name: "uiDismissedBanners", - value: '["translation-ru"]', - domain: "localhost", - path: "/", - }, - ]) + await setCookies(page.context(), { + uiDismissedBanners: '["translation-ru"]', + }) + await page.goto(russianSearchPath) await expect( page.locator('[data-testid="banner-translation"]') diff --git a/test/playwright/utils/navigation.ts b/test/playwright/utils/navigation.ts index 6fa823bdc3..6aea781df9 100644 --- a/test/playwright/utils/navigation.ts +++ b/test/playwright/utils/navigation.ts @@ -464,19 +464,12 @@ export const enableNewHeader = async (page: Page) => { export const enableOldHeader = async (page: Page) => { // Add the new_header cookie - await page.context().addCookies([ - { - name: "features", - value: "%7B%22new_header%22%3A%22off%22%7D", - domain: "localhost", - path: "/", - }, - ]) + await setCookies(page.context(), { features: { new_header: "off" } }) } export const setCookies = async ( context: BrowserContext, - cookies: Record + cookies: Record> ) => { await context.addCookies( Object.entries(cookies).map(([name, value]) => ({