Peach: Local-first video metadata scraper and media manager.
test(web): JAV 推荐、宽封与冒烟用例改拦 /cover-image
longmeidaoa13e56c4c7db
diff --git a/frontend/e2e/jav-recommendations.test.ts b/frontend/e2e/jav-recommendations.test.tsindex 9824f6f1e..61c0dfe3f 100644--- a/frontend/e2e/jav-recommendations.test.ts+++ b/frontend/e2e/jav-recommendations.test.ts@@ -83,7 +83,7 @@ describe('JAV 推荐与加载结构', () => {});const sleeve = '<svg xmlns="http://www.w3.org/2000/svg" width="1480" height="1000"><rect width="1480" height="1000" fill="#135590"/><rect x="800" y="50" width="660" height="900" fill="#f4ad43"/><text x="1050" y="500" font-size="100">FRONT</text></svg>';await page.route('**/cover?*', route => route.fulfill({ contentType: 'image/svg+xml', body: sleeve }));- await page.route('https://example.com/sleeve.svg', route => route.fulfill({ contentType: 'image/svg+xml', body: sleeve }));+ await page.route('**/cover-image?code=*', route => route.fulfill({ contentType: 'image/svg+xml', body: sleeve }));await page.goto(new URL('/jav?tab=discover', page.url()).href, { waitUntil: 'load' });await page.locator('[data-jav-skeleton-cover]').first().waitFor();const cover = await page.locator('[data-jav-skeleton-cover]').first().boundingBox();diff --git a/frontend/e2e/smoke.test.ts b/frontend/e2e/smoke.test.tsindex c17731855..4df9d7d3d 100644--- a/frontend/e2e/smoke.test.ts+++ b/frontend/e2e/smoke.test.ts@@ -325,7 +325,7 @@ describe('路由冒烟', () => {try {await expectBody(opened.page, '/stats', [statsInventoryTab(opened.page)]);const remote = 'https://covers.example.test/sleeve.svg';- await opened.page.route(remote, (route) => route.fulfill({+ await opened.page.route('**/cover-image?code=ABF-348', (route) => route.fulfill({contentType: 'image/svg+xml',body: '<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="1000">'+ '<rect width="1500" height="1000" fill="#888"/></svg>',diff --git a/frontend/e2e/wide-cover.test.ts b/frontend/e2e/wide-cover.test.tsindex 1da5062b6..cbbfbf466 100644--- a/frontend/e2e/wide-cover.test.ts+++ b/frontend/e2e/wide-cover.test.ts@@ -15,7 +15,7 @@ describe('宽封套与来源封面', () => {const page = await context.newPage();const remote = 'https://covers.example.test/wide.svg';const svg = '<svg xmlns="http://www.w3.org/2000/svg" width="800" height="438"><rect width="428" height="438" fill="#777"/><rect x="428" width="372" height="438" fill="#ccc"/></svg>';- await page.route(remote, route => route.fulfill({ contentType: 'image/svg+xml', body: svg }));+ await page.route('**/cover-image?code=*', route => route.fulfill({ contentType: 'image/svg+xml', body: svg }));await page.route('**/jav-cover?code=MIDA-085', route => route.fulfill({ contentType: 'image/svg+xml', body: svg }));await page.route('**/cover?code=EXM-006*', route => route.fulfill({ contentType: 'image/svg+xml', body: svg }));await page.route('**/cover?code=MDVR-276*', route => route.fulfill({ contentType: 'image/svg+xml',