mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
fix(editor): Fix workflow executions list page redirection (#10981)
This commit is contained in:
parent
819d20fa2e
commit
fe7d060568
|
@ -229,6 +229,35 @@ describe('Workflow Executions', () => {
|
||||||
cy.getByTestId('executions-filter-reset-button').should('be.visible').click();
|
cy.getByTestId('executions-filter-reset-button').should('be.visible').click();
|
||||||
executionsTab.getters.executionListItems().eq(11).should('be.visible');
|
executionsTab.getters.executionListItems().eq(11).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should redirect back to editor after seeing a couple of execution using browser back button', () => {
|
||||||
|
createMockExecutions();
|
||||||
|
cy.intercept('GET', '/rest/executions?filter=*').as('getExecutions');
|
||||||
|
|
||||||
|
executionsTab.actions.switchToExecutionsTab();
|
||||||
|
|
||||||
|
cy.wait(['@getExecutions']);
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
|
||||||
|
executionsTab.getters.executionListItems().eq(2).click();
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
executionsTab.getters.executionListItems().eq(4).click();
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
executionsTab.getters.executionListItems().eq(6).click();
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
|
||||||
|
cy.go('back');
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
cy.go('back');
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
cy.go('back');
|
||||||
|
executionsTab.getters.workflowExecutionPreviewIframe().should('exist');
|
||||||
|
cy.go('back');
|
||||||
|
|
||||||
|
cy.url().should('not.include', '/executions');
|
||||||
|
cy.url().should('include', '/workflow/');
|
||||||
|
workflowPage.getters.nodeViewRoot().should('be.visible');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when new workflow is not saved', () => {
|
describe('when new workflow is not saved', () => {
|
||||||
|
|
|
@ -113,7 +113,7 @@ function onDocumentVisibilityChange() {
|
||||||
async function initializeRoute() {
|
async function initializeRoute() {
|
||||||
if (route.name === VIEWS.EXECUTION_HOME && executions.value.length > 0 && workflow.value) {
|
if (route.name === VIEWS.EXECUTION_HOME && executions.value.length > 0 && workflow.value) {
|
||||||
await router
|
await router
|
||||||
.push({
|
.replace({
|
||||||
name: VIEWS.EXECUTION_PREVIEW,
|
name: VIEWS.EXECUTION_PREVIEW,
|
||||||
params: { name: workflow.value.id, executionId: executions.value[0].id },
|
params: { name: workflow.value.id, executionId: executions.value[0].id },
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue