fix(editor): Disable browser route pushing for NDV URL (no-changelog) (#14900)

This commit is contained in:
Charlie Kolb
2025-04-25 15:57:51 +02:00
committed by GitHub
parent e27e630af9
commit e8ca5e75a9
2 changed files with 3 additions and 23 deletions

View File

@@ -48,7 +48,7 @@ describe('Workflows', () => {
// Here we go back via browser rather than the home button
// As this already updates the route
cy.go(-2);
cy.go(-1);
cy.url().should('include', getWorkflowsPageUrl());
@@ -59,27 +59,7 @@ describe('Workflows', () => {
cy.url().should('include', '/workflow/');
});
it('should correct route when opening and closing NDV via browser button', () => {
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', () => {
it('should correct route when opening and closing NDV', () => {
getCreateWorkflowButton().click();
saveWorkflowOnButtonClick();
cy.url().then((startUrl) => {

View File

@@ -1657,7 +1657,7 @@ watch(
const nodeId = val?.id ? workflowsStore.getPartialIdForNode(val?.id) : '';
if (nodeId !== route.params.nodeId) {
await router.push({
await router.replace({
name: route.name,
params: { name: workflowId.value, nodeId },
});