Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
test: scope agent build draft e2e selector (#38563)
yyh1340bef09662
diff --git a/e2e/features/step-definitions/agent-v2/build-draft.steps.ts b/e2e/features/step-definitions/agent-v2/build-draft.steps.tsindex 87901434035..7a4c738ea73 100644--- a/e2e/features/step-definitions/agent-v2/build-draft.steps.ts+++ b/e2e/features/step-definitions/agent-v2/build-draft.steps.ts@@ -1,4 +1,4 @@-import type { Response } from '@playwright/test'+import type { Page, Response } from '@playwright/test'import type { DifyWorld } from '../../support/world'import { readFile } from 'node:fs/promises'import { Given, Then, When } from '@cucumber/cucumber'@@ -34,6 +34,9 @@ import {const BUILD_DRAFT_RUNTIME_STEP_TIMEOUT_MS = 180_000+const getBuildDraftBar = (page: Page) =>+ page.getByRole('group', { name: 'Build draft' })+Given('an Agent v2 Build draft adds the supported E2E files, skills, and env',async function (this: DifyWorld) {@@ -138,7 +141,7 @@ When(await page.getByRole('button', { name: 'Start build' }).click()expect((await checkoutResponsePromise).ok()).toBe(true)expect((await chatResponsePromise).ok()).toBe(true)- await expect(page.getByText('Build draft')).toBeVisible({ timeout: 120_000 })+ await expect(getBuildDraftBar(page)).toBeVisible({ timeout: 120_000 })await expect(page.getByRole('button', { exact: true, name: 'Apply' })).toBeEnabled({ timeout: 120_000 })await expect(page.getByRole('button', { exact: true, name: 'Discard' })).toBeEnabled()},@@ -245,7 +248,7 @@ Then('Agent v2 Build chat unavailable Skill and Tool recovery should be availablThen('I should see the Agent v2 Build draft pending changes', async function (this: DifyWorld) {const page = this.getPage()- await expect(page.getByText('Build draft')).toBeVisible({ timeout: 30_000 })+ await expect(getBuildDraftBar(page)).toBeVisible({ timeout: 30_000 })await expect(page.getByRole('button', { exact: true, name: 'Apply' })).toBeEnabled()await expect(page.getByRole('button', { exact: true, name: 'Discard' })).toBeEnabled()})@@ -401,7 +404,7 @@ Then(Then('the Agent v2 Build draft should no longer be active', async function (this: DifyWorld) {const page = this.getPage()- await expect(page.getByText('Build draft')).not.toBeVisible()+ await expect(getBuildDraftBar(page)).not.toBeVisible()await expect(page.getByRole('button', { name: 'Apply' })).not.toBeVisible()await expect(page.getByRole('button', { name: 'Discard' })).not.toBeVisible()})diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/build-draft-bar.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/build-draft-bar.tsxindex f053d47287d..c3284e75b1c 100644--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/build-draft-bar.tsx+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/build-draft-bar.tsx@@ -55,6 +55,8 @@ export function AgentBuildDraftBar({<CollapsibleRootopen={open}onOpenChange={handleOpenChange}+ role="group"+ aria-label={t('agentDetail.configure.buildDraft.title')}className="group/build-draft pointer-events-auto relative w-full max-w-full min-w-0 overflow-hidden rounded-xl border-[1.5px] border-[#A0BDFF] bg-components-panel-bg-blur shadow-lg shadow-shadow-shadow-5 backdrop-blur-[10px]"><AgentBuildGridTexture