mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Disable browser route pushing for NDV URL (no-changelog) (#14900)
This commit is contained in:
@@ -48,7 +48,7 @@ describe('Workflows', () => {
|
|||||||
|
|
||||||
// Here we go back via browser rather than the home button
|
// Here we go back via browser rather than the home button
|
||||||
// As this already updates the route
|
// As this already updates the route
|
||||||
cy.go(-2);
|
cy.go(-1);
|
||||||
|
|
||||||
cy.url().should('include', getWorkflowsPageUrl());
|
cy.url().should('include', getWorkflowsPageUrl());
|
||||||
|
|
||||||
@@ -59,27 +59,7 @@ describe('Workflows', () => {
|
|||||||
cy.url().should('include', '/workflow/');
|
cy.url().should('include', '/workflow/');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should correct route when opening and closing NDV via browser button', () => {
|
it('should correct route when opening and closing NDV', () => {
|
||||||
getCreateWorkflowButton().click();
|
|
||||||
saveWorkflowOnButtonClick();
|
|
||||||
cy.url().then((startUrl) => {
|
|
||||||
cy.createFixtureWorkflow('Test_workflow_1.json', 'Empty State Card Workflow');
|
|
||||||
cy.url().should('equal', startUrl);
|
|
||||||
|
|
||||||
addNodeToCanvas(EDIT_FIELDS_SET_NODE_NAME, true, true);
|
|
||||||
|
|
||||||
// Getting the generated nodeId is awkward, so we just ensure the URL changed
|
|
||||||
cy.url().should('not.equal', startUrl);
|
|
||||||
|
|
||||||
// Here we go back via browser rather than the home button
|
|
||||||
// As this already updates the route
|
|
||||||
cy.go(-1);
|
|
||||||
|
|
||||||
cy.url().should('equal', startUrl);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should correct route when opening and closing NDV via browser button', () => {
|
|
||||||
getCreateWorkflowButton().click();
|
getCreateWorkflowButton().click();
|
||||||
saveWorkflowOnButtonClick();
|
saveWorkflowOnButtonClick();
|
||||||
cy.url().then((startUrl) => {
|
cy.url().then((startUrl) => {
|
||||||
|
|||||||
@@ -1657,7 +1657,7 @@ watch(
|
|||||||
const nodeId = val?.id ? workflowsStore.getPartialIdForNode(val?.id) : '';
|
const nodeId = val?.id ? workflowsStore.getPartialIdForNode(val?.id) : '';
|
||||||
|
|
||||||
if (nodeId !== route.params.nodeId) {
|
if (nodeId !== route.params.nodeId) {
|
||||||
await router.push({
|
await router.replace({
|
||||||
name: route.name,
|
name: route.name,
|
||||||
params: { name: workflowId.value, nodeId },
|
params: { name: workflowId.value, nodeId },
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user