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 5a70f11202..2c9d0f5002 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()
-
- await waitFor(() => {
- expect(mockCreateBuilder).toHaveBeenCalled()
- })
+ render()
fireEvent.click(screen.getByTestId('modal-confirm'))
await waitFor(() => {
- expect(mockParsePluginErrorMessage).toHaveBeenCalled()
+ expect(mockVerifyCredentials).toHaveBeenCalledWith(
+ expect.objectContaining({
+ provider: 'test-provider',
+ subscriptionBuilderId: builder.id,
+ }),
+ expect.objectContaining({
+ onSuccess: expect.any(Function),
+ onError: expect.any(Function),
+ }),
+ )
+ })
+
+ await waitFor(() => {
+ 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 7925c9d454..57105f2084 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 () => {