From b6b32c24e152650cf94083c21195fe8bd24328f5 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 24 Sep 2026 15:52:47 +0800 Subject: [PATCH] test(website-docs): update integration test for the v0.8.2 header and release gallery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The docs header gained a '版本' entry, and the homepage release gallery now ends with the 对话控制 slide linking to 03-features/18-chat-experience instead of the v0.8.0 memory slide. Expect the new header entry, and assert the release link lands on the chat-experience page by path and heading. The memory doc stays covered by the search and direct-route checks. --- website-docs/scripts/test-integration.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website-docs/scripts/test-integration.mjs b/website-docs/scripts/test-integration.mjs index 7c459d8a..372cb6c7 100644 --- a/website-docs/scripts/test-integration.mjs +++ b/website-docs/scripts/test-integration.mjs @@ -59,7 +59,7 @@ try { assert.match(await page.locator('.VPDoc h1').innerText(), /快速上手/); assert.equal(await page.getByRole('link', { name: '文档首页', exact: true }).count(), 0); assert.deepEqual((await headerGeometry(page)).controls, masthead.controls); - assert.deepEqual((await headerGeometry(page)).links.map(link => link[0]), ['快速开始', '架构', '功能', 'API', '客户端', '开发', 'GitHub']); + assert.deepEqual((await headerGeometry(page)).links.map(link => link[0]), ['快速开始', '架构', '功能', 'API', '客户端', '开发', '版本', 'GitHub']); assert.equal(await page.locator('.wk-header').evaluate(el => el.getBoundingClientRect().height), 64); assert.equal(context.pages().length, 1); // Switching distant sections must reveal the selected sidebar item in both directions. @@ -91,10 +91,11 @@ try { await expectTheme(page, false); assert.equal(context.pages().length, 1); - // Navigation to new v0.8.0 docs, returning through the explicit home link. + // Navigation to new v0.8.2 docs, returning through the explicit home link. await page.locator('#release').getByRole('link', { name: '了解更多', exact: true }).last().click(); await page.waitForSelector('.VPDoc h1'); - assert.match(await page.locator('.VPDoc h1').innerText(), /记忆/); + assert.equal(new URL(page.url()).pathname, '/docs/03-features/18-chat-experience.html'); + assert.match(await page.locator('.VPDoc h1').innerText(), /会话与对话体验/); await page.locator('.wk-brand').click(); await homepage(); assert.equal(context.pages().length, 1);