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

refactor(editor): Use typed-mocks to speed up tests and type-checking (no-changelog) #9796

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

netroy
Copy link
Member

@netroy netroy commented Jun 18, 2024

Summary

This PR updates editor-ui tests to use typed mocks using vitest-mock-extended, instead of checking in really large .ts files containing mocking data.

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included

@netroy netroy requested a review from alexgrozav June 18, 2024 22:41
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jun 18, 2024
@netroy netroy force-pushed the editor-typed-mocks branch from 2c40423 to 739a6d8 Compare June 19, 2024 01:44
Copy link
Member

@alexgrozav alexgrozav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 🙌

Copy link
Contributor

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Jun 19, 2024

3 flaky tests on run #5571 ↗︎

0 395 0 0 Flakiness 3

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project: n8n Commit: 739a6d84c0
Status: Passed Duration: 04:40 💡
Started: Jun 19, 2024 5:14 AM Ended: Jun 19, 2024 5:19 AM
Flakiness  5-ndv.cy.ts • 2 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  10-undo-redo.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Undo/Redo > should undo/redo adding connected nodes Test Replay Screenshots Video

Review all test suite changes for PR #9796 ↗︎

@netroy netroy merged commit e3e20b4 into master Jun 19, 2024
26 checks passed
@netroy netroy deleted the editor-typed-mocks branch June 19, 2024 05:41
adrian-martinez-onestic pushed a commit to onesdata/n8n-fork that referenced this pull request Jun 20, 2024
adrian-martinez-onestic pushed a commit to onesdata/n8n-fork that referenced this pull request Jun 20, 2024
@janober
Copy link
Member

janober commented Jun 20, 2024

Got released with [email protected]

1 similar comment
@janober
Copy link
Member

janober commented Jun 20, 2024

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants