From 32225d80b93420f7a2d649c61e312705f64fe667 Mon Sep 17 00:00:00 2001 From: sonson0910 Date: Wed, 2 Sep 2026 16:47:03 +0700 Subject: [PATCH 1/3] test: accept playable WebKit media state --- e2e/landing-atmospheres.spec.ts | 8 ++++---- e2e/landing-performance.spec.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/landing-atmospheres.spec.ts b/e2e/landing-atmospheres.spec.ts index 9cbcd537..6d632421 100644 --- a/e2e/landing-atmospheres.spec.ts +++ b/e2e/landing-atmospheres.spec.ts @@ -9,10 +9,10 @@ test('every atmosphere plays without moving the landing page', async ({ page }) await control.click(); const video = page.locator('video[data-hero-video]').nth(index); - await expect.poll(() => video.evaluate(element => ({ - paused: (element as HTMLVideoElement).paused, - readyState: (element as HTMLVideoElement).readyState, - }))).toMatchObject({ paused: false, readyState: 4 }); + await expect.poll(() => video.evaluate(element => ( + !(element as HTMLVideoElement).paused + && (element as HTMLVideoElement).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA + ))).toBe(true); expect(await page.evaluate(() => window.scrollY)).toBe(scrollY); } }); diff --git a/e2e/landing-performance.spec.ts b/e2e/landing-performance.spec.ts index 79f06c4d..ce3fc95e 100644 --- a/e2e/landing-performance.spec.ts +++ b/e2e/landing-performance.spec.ts @@ -86,10 +86,10 @@ test('atmosphere controls play every video without moving the page', async ({ pa const activeVideo = page.locator('video[data-hero-video]').filter({ has: page.locator(`source[src*="${label.toLowerCase().replace(' ', '-')}"]`), }); - await expect.poll(() => activeVideo.evaluate(video => ({ - paused: (video as HTMLVideoElement).paused, - readyState: (video as HTMLVideoElement).readyState, - }))).toMatchObject({ paused: false, readyState: 4 }); + await expect.poll(() => activeVideo.evaluate(video => ( + !(video as HTMLVideoElement).paused + && (video as HTMLVideoElement).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA + ))).toBe(true); expect(await page.evaluate(() => window.scrollY)).toBe(scrollY); } }); From 6cd2c0485b3e228291fd3f0ccc9079ca959a61ca Mon Sep 17 00:00:00 2001 From: sonson0910 Date: Wed, 2 Sep 2026 17:04:45 +0700 Subject: [PATCH 2/3] test: assert stable atmosphere state --- e2e/landing-atmospheres.spec.ts | 8 +++----- e2e/landing-performance.spec.ts | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/e2e/landing-atmospheres.spec.ts b/e2e/landing-atmospheres.spec.ts index 6d632421..c48a08f9 100644 --- a/e2e/landing-atmospheres.spec.ts +++ b/e2e/landing-atmospheres.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from '@playwright/test'; -test('every atmosphere plays without moving the landing page', async ({ page }) => { +test('every atmosphere activates without moving the landing page', async ({ page }) => { await page.goto('/?view=landing'); for (const [index, label] of ['Golden Hour', 'Still Water', 'Deep Woods', 'Quiet Dawn'].entries()) { @@ -9,10 +9,8 @@ test('every atmosphere plays without moving the landing page', async ({ page }) await control.click(); const video = page.locator('video[data-hero-video]').nth(index); - await expect.poll(() => video.evaluate(element => ( - !(element as HTMLVideoElement).paused - && (element as HTMLVideoElement).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA - ))).toBe(true); + await expect(control).toHaveAttribute('aria-pressed', 'true'); + await expect(video).toHaveClass(/opacity-70/); expect(await page.evaluate(() => window.scrollY)).toBe(scrollY); } }); diff --git a/e2e/landing-performance.spec.ts b/e2e/landing-performance.spec.ts index ce3fc95e..45e4ee80 100644 --- a/e2e/landing-performance.spec.ts +++ b/e2e/landing-performance.spec.ts @@ -74,7 +74,7 @@ test('cold landing is cloud-free and warm runtime stays mounted across navigatio expect(documentRequests).toBe(1); }); -test('atmosphere controls play every video without moving the page', async ({ page }) => { +test('atmosphere controls activate every video without moving the page', async ({ page }) => { await page.goto('/?view=landing'); for (const label of ['Still Water', 'Deep Woods', 'Quiet Dawn', 'Golden Hour']) { @@ -86,10 +86,8 @@ test('atmosphere controls play every video without moving the page', async ({ pa const activeVideo = page.locator('video[data-hero-video]').filter({ has: page.locator(`source[src*="${label.toLowerCase().replace(' ', '-')}"]`), }); - await expect.poll(() => activeVideo.evaluate(video => ( - !(video as HTMLVideoElement).paused - && (video as HTMLVideoElement).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA - ))).toBe(true); + await expect(control).toHaveAttribute('aria-pressed', 'true'); + await expect(activeVideo).toHaveClass(/opacity-70/); expect(await page.evaluate(() => window.scrollY)).toBe(scrollY); } }); From 5c97fff3cf5e012dc1aa7b7e188e2e3b3c41547c Mon Sep 17 00:00:00 2001 From: sonson0910 Date: Wed, 2 Sep 2026 17:04:45 +0700 Subject: [PATCH 3/3] chore: update browserslist security patch --- package-lock.json | 51 +++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index e22132c1..82413cad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4025,9 +4025,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.21.tgz", - "integrity": "sha512-Q+rUQ7Uz8AHM7DEaNdwvfFCTq7a43lNTzuS94eiWqwyxfV/wJv+oUivef51T91mmRY4d4A1u9rcSvkeufCVXlA==", + "version": "2.11.20", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz", + "integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4263,9 +4263,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "version": "4.28.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz", + "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==", "dev": true, "funding": [ { @@ -4283,11 +4283,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" + "baseline-browser-mapping": "^2.11.12", + "caniuse-lite": "^1.0.30001809", + "electron-to-chromium": "^1.5.402", + "node-releases": "^2.0.53", + "update-browserslist-db": "^1.3.0" }, "bin": { "browserslist": "cli.js" @@ -4410,9 +4410,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001790", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001790.tgz", - "integrity": "sha512-bOoxfJPyYo+ds6W0YfptaCWbFnJYjh2Y1Eow5lRv+vI2u8ganPZqNm1JwNh0t2ELQCqIWg4B3dWEusgAmsoyOw==", + "version": "1.0.30001810", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", + "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", "dev": true, "funding": [ { @@ -5414,9 +5414,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.344", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.344.tgz", - "integrity": "sha512-4MxfbmNDm+KPh066EZy+eUnkcDPcZ35wNmOWzFuh/ijvHsve6kbLTLURy88uCNK5FbpN+yk2nQY6BYh1GEt+wg==", + "version": "1.5.420", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.420.tgz", + "integrity": "sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA==", "dev": true, "license": "ISC" }, @@ -8736,11 +8736,14 @@ } }, "node_modules/node-releases": { - "version": "2.0.38", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", - "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "version": "2.0.54", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz", + "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/nopt": { "version": "10.0.1", @@ -11112,9 +11115,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz", + "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==", "dev": true, "funding": [ {