From d1a2fd1e58488126193a71b2cc945f7bbafdfd8e Mon Sep 17 00:00:00 2001 From: yyh Date: Wed, 1 Jul 2026 18:28:40 +0800 Subject: [PATCH] test(e2e): mark build tool writeback blocked --- e2e/features/agent-v2/build-draft.feature | 7 +++++++ .../step-definitions/agent-v2/configure.steps.ts | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/e2e/features/agent-v2/build-draft.feature b/e2e/features/agent-v2/build-draft.feature index 671cc8abeb0..95eed4e0437 100644 --- a/e2e/features/agent-v2/build-draft.feature +++ b/e2e/features/agent-v2/build-draft.feature @@ -44,3 +44,10 @@ Feature: Agent v2 build draft When I refresh the current page Then I should see the updated E2E prompt in the Agent v2 prompt editor And the Agent v2 Build draft should no longer be active + + @build-tool-writeback @feature-gated + Scenario: Applying a Build draft can add Dify Tools to the Agent configuration + Given I am signed in as the default E2E admin + And a basic configured Agent v2 test agent has been created via API + When I open the Agent v2 configure page + Then Agent v2 Build chat Dify Tool writeback should be available diff --git a/e2e/features/step-definitions/agent-v2/configure.steps.ts b/e2e/features/step-definitions/agent-v2/configure.steps.ts index 3232d028df3..9975bb00518 100644 --- a/e2e/features/step-definitions/agent-v2/configure.steps.ts +++ b/e2e/features/step-definitions/agent-v2/configure.steps.ts @@ -743,6 +743,17 @@ Then('Agent v2 Content Moderation Settings should be available', async function } }) +Then('Agent v2 Build chat Dify Tool writeback should be available', async function (this: DifyWorld) { + const toolsSection = this.getPage().getByRole('region', { name: 'Tools' }) + + await expect(toolsSection).toBeVisible({ timeout: 30_000 }) + + return skipBlockedPrecondition( + this, + 'Build draft Dify Tool writeback is not available: Build draft currently supports files, skills, and env only.', + ) +}) + Then( 'I should see the Agent v2 environment variables from the valid import in Advanced Settings', async function (this: DifyWorld) {