-
Notifications
You must be signed in to change notification settings - Fork 9k
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
test(editor): Unit tests for assistant store and new design system components (no-changelog) #10508
Conversation
* master: 🚀 Release 1.56.0 (#10502) fix(editor): Sending 'Assistant session started event' to posthog (no-changelog) (#10500) fix(core): Use class-validator with XSS check for survey answers (#10490) fix(editor): Stop telemetry from triggering when initializing workflow in new canvas (no-changelog) (#10492) fix(AI Transform Node): Remove prompt as it's already set in ASK AI endpoint (no-changelog) (#10496) fix(editor): Prevent unloading when changes are pending in new canvas (no-changelog) (#10474) feat(core): Upgrade axios to address CVE-2024-39338 (no-changelog) (#10494)
* master: ci: Fix benchmark cli path (no-changelog) (#10506) refactor(core): Standardize filenames in `cli` (no-changelog) (#10484) fix(AI Agent Node): Allow AWS Bedrock Chat to be used with conversational agent (#10489) feat(AI Agent Node): Add tutorial link to agent node (#10493) feat: Add n8n-benchmark cli (no-changelog) (#10410) feat(core): Logout should invalidate the auth token (no-changelog) (#10335) refactor(editor): Add types to importCurlEventBus (no-changelog) (#10497) refactor(editor): Add types to htmlEditorEventBus (no-changelog) (#10498) refactor(editor): Add types for dataPinningEventBus (no-changelog) (#10499) refactor(editor): Add types to codeNodeEditorEventBus (no-changelog) (#10501)
packages/editor-ui/src/stores/__tests__/assistant.store.test.ts
Outdated
Show resolved
Hide resolved
}); | ||
it('renders chat with messages correctly', () => { | ||
const { container } = render(AskAssistantChat, { | ||
props: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a function that create this objects? By default would have this values and they can be overrides via parameters. That way we do not need to do so much repetition? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but since the assistant types are so tangled up this will require a lot of TypeScript gymnastics or a lot of if/else
branches which will make util function pretty ugly so decided to keep it this way. Let me know what you think @RicardoE105
|
||
const message: ChatRequest.MessageResponse = { | ||
type: 'agent-suggestion', | ||
role: 'assistant', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above? Maybe we can have a create assistant message and provide as parameter the type, which will create the object with default values and accept parameters in case you want to override values for a specific Uds case 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above :)
n8n Run #6590
Run Properties:
|
Project |
n8n
|
Branch Review |
ADO2-74-assistant-store-unit-tests
|
Run status |
Passed #6590
|
Run duration | 04m 44s |
Commit |
d275f2293c: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 MiloradFilipovic 🗃️ e2e/*
|
Committer | Milorad Filipovic |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
414
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
* master: ci: Use correct env in destroy benchmark env job (no-changelog) (#10546) refactor(editor): Standardize components sections order (no-changelog) (#10540) refactor(editor): Convert Node.vue component to composition API (no-changelog) (#10535) feat: Add new credentials for the HTTP Request node (#9833) fix: Pass k6 api token correctly (no-changelog) (#10536) feat: Report benchmark results (no-changelog) (#10534) test(editor): Unit tests for assistant store and new design system components (no-changelog) (#10508) refactor(editor): Migrate `App.vue` to composition api (no-changelog) (#10524) refactor(editor): Convert DeleteUserModal to composition api (no-changelog) (#10531) ci: Fix fetch depth in benchmark (no-changelog) (#10532) ci: Use correct env for benchmark nightly workflow (no-changelog) (#10529) fix(core): Update zod to the latest version (no-changelog) (#10516) feat: Benchmark env with run scripts (no-changelog) (#10477) ci: Configure eslint for benchmark cli (#10480) fix(AI Transform Node): Data Transformation > Other section should not contain node (no-changelog) (#10519) fix(editor): Prevent dialog overlay from rendering on top of AI Assistant (no-changelog) (#10509) fix: Fix resolving of k6 executable (no-changelog) (#10511) fix(core): Restore Redis cache key (#10520) # Conflicts: # packages/editor-ui/src/App.vue # packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue # packages/editor-ui/src/components/Modal.vue # packages/editor-ui/src/components/NodeDetailsView.vue
Got released with |
Summary
Related Linear tickets, Github issues, and Community forum posts
Closes ADO2-74
Closes ADO2-65
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)