From 0ffbd658431dbda5b042a708aec6bd5ea64bffb4 Mon Sep 17 00:00:00 2001 From: Yif <877193178@qq.com> Date: Tue, 8 Sep 2026 01:42:35 +0800 Subject: [PATCH] test(web): follow hero headline nesting and Tool definitions copy in e2e --- apps/web/tests/built-boot.expected.e2e.ts | 2 +- apps/web/tests/startup-auto-selection.e2e.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/built-boot.expected.e2e.ts b/apps/web/tests/built-boot.expected.e2e.ts index 275cda21d5..d7292382df 100644 --- a/apps/web/tests/built-boot.expected.e2e.ts +++ b/apps/web/tests/built-boot.expected.e2e.ts @@ -112,7 +112,7 @@ it('boots the built plugin graph and renders a fixture session end to end', asyn fireEvent.click(contextTrigger) const contextPanel = await screen.findByRole('dialog', { name: 'of context used' }) within(contextPanel).getByText('System prompt') - within(contextPanel).getByText('Tools') + within(contextPanel).getByText('Tool definitions') within(contextPanel).getByText('Messages') // The write/edit turns render a real diff card through the assembled graph diff --git a/apps/web/tests/startup-auto-selection.e2e.ts b/apps/web/tests/startup-auto-selection.e2e.ts index 882b99b420..613eb4a7d0 100644 --- a/apps/web/tests/startup-auto-selection.e2e.ts +++ b/apps/web/tests/startup-auto-selection.e2e.ts @@ -42,7 +42,9 @@ describe('web e2e: startup auto-selection', () => { onTestFailed(() => saveFailureShot(page, 'web-e2e-first-workspace-stable-tree')) await page.locator(`${ROOT_PHASE}[data-phase="hero"]`).waitFor({ timeout: 15_000 }) const headline = page.getByText('Into the Unknown', { exact: true }) - const fishHitbox = headline.locator('xpath=preceding-sibling::span[1]') + // The headline text sits in its own span inside the title group; the fish + // hitbox precedes the group, not the text span. + const fishHitbox = headline.locator('xpath=../preceding-sibling::span[1]') const fish = fishHitbox.locator('svg') expect(await fish.evaluate(node => getComputedStyle(node).color)) .toBe(await headline.evaluate(node => getComputedStyle(node).color))