Skip to content

fix: Close NDV using correct button (no-changelog) #15745

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shortstacked
Copy link
Contributor

@shortstacked shortstacked commented May 27, 2025

The test was failing due to how Cypress runs in headless vs non headless mode. Esc not always being registered etc.

Summary

Fixes the failing project test.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-2815/flaky-ui-projects-when-starting-from-scratch-should-create-sub
Flaky Test Run: https://github.com/n8n-io/n8n/actions/runs/15274055259/job/42956066490 200 passed

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)

The test was failing due to how Cypress runs in headless vs non headless mode. Esc not always being registered etc.
@shortstacked shortstacked requested a review from MarcL May 27, 2025 11:27
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic reviewed 1 file and found no issues. Review PR in cubic.dev.

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label May 27, 2025
The test was failing due to how Cypress runs in headless vs non headless mode. Esc not always being registered etc.
getNdvContainer().should('be.visible');
cy.get('body').type('{esc}');
getBackToCanvasButton().click();
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] There's also a clickGetBackToCanvas() method which does the same thing if you wanted to use that.

Comment on lines 296 to 300
// Stub window.open before adding sub-workflow opens a new tab
cy.window().then((win) => {
cy.stub(win, 'open').as('windowOpen').returns(null);
});

Copy link
Contributor

Choose a reason for hiding this comment

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

For my own (lack of) Cypress knowledge, we're now stubbing the window.open call and I assume that stops the tab from opening. How do we ensure the additional nodes are added to the sub-workflow (in the new tab)?

Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants