Skip to content

armgit / dify

Public Imported from GitHub
0

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.

test: stable test (#32108)

Stephen Zhou0428ac5f3aca
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.spec.tsx
index 6edb493e177..d9aeca52f97 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.spec.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.spec.tsx
@@ -1138,17 +1138,27 @@ describe('CommonCreateModal', () => {
mockVerifyCredentials.mockImplementation((params, { onError }) => {
onError(new Error('Raw error'))
})
+ const builder = createMockSubscriptionBuilder()
- render(<CommonCreateModal {...defaultProps} />)
+ render(<CommonCreateModal {...defaultProps} builder={builder} />)
+
+ fireEvent.click(screen.getByTestId('modal-confirm'))
await waitFor(() => {
- expect(mockCreateBuilder).toHaveBeenCalled()
+ expect(mockVerifyCredentials).toHaveBeenCalledWith(
+ expect.objectContaining({
+ provider: 'test-provider',
+ subscriptionBuilderId: builder.id,
+ }),
+ expect.objectContaining({
+ onSuccess: expect.any(Function),
+ onError: expect.any(Function),
+ }),
+ )
})
- fireEvent.click(screen.getByTestId('modal-confirm'))
-
await waitFor(() => {
- expect(mockParsePluginErrorMessage).toHaveBeenCalled()
+ expect(mockParsePluginErrorMessage).toHaveBeenCalledWith(expect.any(Error))
})
})
diff --git a/web/app/components/tools/workflow-tool/configure-button.spec.tsx b/web/app/components/tools/workflow-tool/configure-button.spec.tsx
index 7925c9d454f..57105f20847 100644
--- a/web/app/components/tools/workflow-tool/configure-button.spec.tsx
+++ b/web/app/components/tools/workflow-tool/configure-button.spec.tsx
@@ -774,7 +774,9 @@ describe('WorkflowToolConfigureButton', () => {
})
// Component should still render without crashing
- expect(screen.getByText('workflow.common.workflowAsTool')).toBeInTheDocument()
+ await waitFor(() => {
+ expect(screen.getByText('workflow.common.workflowAsTool')).toBeInTheDocument()
+ })
})
it('should handle rapid publish/unpublish state changes', async () => {