Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Remember to wrap your app in a <CopilotKit> on Test Run #4093

Open
Kiryous opened this issue Mar 18, 2025 · 1 comment · May be fixed by #4102
Open

[🐛 Bug]: Remember to wrap your app in a <CopilotKit> on Test Run #4093

Kiryous opened this issue Mar 18, 2025 · 1 comment · May be fixed by #4102
Assignees
Labels
Bug Something isn't working

Comments

@Kiryous
Copy link
Contributor

Kiryous commented Mar 18, 2025

Describe the bug

Image

To Reproduce
Steps to reproduce the behavior:

  1. Go to workflows/builder
  2. Add manual trigger, any step, add name and description.
  3. Click Test Run
  4. See error
@Kiryous Kiryous self-assigned this Mar 18, 2025
@talboren talboren changed the title [🐛 Bug]: [🐛 Bug]: "Remember to wrap your app in a <CopilotKit>" Mar 18, 2025
@Kiryous Kiryous changed the title [🐛 Bug]: "Remember to wrap your app in a <CopilotKit>" [🐛 Bug]: Remember to wrap your app in a <CopilotKit> on Test Run Mar 18, 2025
Copy link

dosubot bot commented Mar 18, 2025

To resolve the JavaScript error indicating that an application needs to be wrapped in a CopilotKit component when testing a workflow in workflows/builder, ensure that the WorkflowBuilderWidgetSafe component is correctly wrapped with CopilotKit when the OpenAI key is set. You can verify this by checking the test case setup:

  1. Mock the useConfig hook to return { OPEN_AI_API_KEY_SET: true }.
  2. Ensure that the WorkflowBuilderWidgetSafe component is rendered within a CopilotKit wrapper.

Here's a snippet demonstrating the correct setup:

(useConfig as jest.Mock).mockReturnValue({
  data: { OPEN_AI_API_KEY_SET: true },
});

render(
  <WorkflowBuilderWidgetSafe
    workflowRaw={mockWorkflowRaw}
    workflowId={mockWorkflowId}
  />
);

// Verify CopilotKit wrapper is present
expect(screen.getByTestId("copilot-wrapper")).toBeInTheDocument();

Make sure that the useConfig hook is correctly configured to trigger the wrapping of WorkflowBuilderWidget with CopilotKit during testing [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the Bug Something isn't working label Mar 18, 2025
@Kiryous Kiryous linked a pull request Mar 18, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant