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

fix(editor): Fix workflow initilisation for test definition routes & add unit tests #12507

Merged
merged 7 commits into from
Jan 8, 2025

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Jan 8, 2025

Summary

This PR improves the Test Definition UI by:

  1. Adding step-by-step descriptions for the test definition workflow instead of tooltips
  2. Introducing a new TestDefinitionRootView component to properly initialize workflows and handle nested routing
  3. Adding unit tests for NodesPinning and TestDefinitionRootView components
  4. Updating routing structure for test definitions to use nested routes, keeping sidebar and header only on the root route
  5. Include both id and name when setting pinned nodes

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@OlegIvaniv OlegIvaniv requested a review from burivuhster January 8, 2025 13:23
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/editor-ui/src/router.ts 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@burivuhster burivuhster left a comment

Choose a reason for hiding this comment

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

Looks good! Only one minor comment, feel free to disregard


async function initWorkflow() {
const workflowId = router.currentRoute.value.params.name as string;
const isAlreadyInitialized = workflowStore.workflow.id === workflowId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could it be already in the process of fetching workflow at this point? isAlreadyInitialized will still be false in that case and the second request will be triggered.

Copy link
Contributor

github-actions bot commented Jan 8, 2025

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Jan 8, 2025

n8n    Run #8663

Run Properties:  status check passed Passed #8663  •  git commit 034d247ae7: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Project n8n
Branch Review ai-567-update-ui-copy
Run status status check passed Passed #8663
Run duration 04m 55s
Commit git commit 034d247ae7: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Committer Oleg Ivaniv
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 489
View all changes introduced in this branch ↗︎

@OlegIvaniv OlegIvaniv merged commit 2775f61 into master Jan 8, 2025
37 checks passed
@OlegIvaniv OlegIvaniv deleted the ai-567-update-ui-copy branch January 8, 2025 15:07
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.

2 participants