mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(editor): Don't confirm archiving nonactive workflows (no-changelog) (#15182)
This commit is contained in:
@@ -68,7 +68,6 @@ describe('Workflows', () => {
|
||||
for (let i = 0; i < multipleWorkflowsCount + 1; i++) {
|
||||
cy.getByTestId('workflow-card-actions').first().click();
|
||||
WorkflowsPage.getters.workflowArchiveButton().click();
|
||||
cy.get('button').contains('archive').click();
|
||||
successToast().should('be.visible');
|
||||
}
|
||||
|
||||
@@ -158,7 +157,6 @@ describe('Workflows', () => {
|
||||
// Archive -> Unarchive -> Archive -> Delete on the first workflow
|
||||
cy.getByTestId('workflow-card-actions').first().click();
|
||||
WorkflowsPage.getters.workflowArchiveButton().click();
|
||||
cy.get('button').contains('archive').click();
|
||||
successToast().should('be.visible');
|
||||
|
||||
cy.getByTestId('workflow-card-actions').first().click();
|
||||
@@ -167,7 +165,6 @@ describe('Workflows', () => {
|
||||
|
||||
cy.getByTestId('workflow-card-actions').first().click();
|
||||
WorkflowsPage.getters.workflowArchiveButton().click();
|
||||
cy.get('button').contains('archive').click();
|
||||
successToast().should('be.visible');
|
||||
|
||||
cy.getByTestId('workflow-card-actions').first().click();
|
||||
|
||||
@@ -267,7 +267,7 @@ describe('Workflow Actions', () => {
|
||||
.should('have.class', 'is-disabled');
|
||||
});
|
||||
|
||||
it('should archive workflow and then delete it', () => {
|
||||
it('should archive nonactive workflow and then delete it', () => {
|
||||
WorkflowPage.actions.saveWorkflowOnButtonClick();
|
||||
WorkflowPage.getters.archivedTag().should('not.exist');
|
||||
|
||||
@@ -275,7 +275,6 @@ describe('Workflow Actions', () => {
|
||||
WorkflowPage.getters.workflowMenu().should('be.visible');
|
||||
WorkflowPage.getters.workflowMenu().click();
|
||||
WorkflowPage.getters.workflowMenuItemArchive().click();
|
||||
WorkflowPage.actions.acceptConfirmModal();
|
||||
|
||||
successToast().should('exist');
|
||||
cy.url().should('include', WorkflowPages.url);
|
||||
@@ -295,8 +294,11 @@ describe('Workflow Actions', () => {
|
||||
cy.url().should('include', WorkflowPages.url);
|
||||
});
|
||||
|
||||
it('should archive workflow and then unarchive it', () => {
|
||||
it('should archive active workflow and then delete it', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(SCHEDULE_TRIGGER_NODE_NAME);
|
||||
WorkflowPage.actions.saveWorkflowOnButtonClick();
|
||||
WorkflowPage.actions.activateWorkflow();
|
||||
WorkflowPage.getters.isWorkflowActivated();
|
||||
WorkflowPage.getters.archivedTag().should('not.exist');
|
||||
|
||||
// Archive the workflow
|
||||
@@ -304,6 +306,35 @@ describe('Workflow Actions', () => {
|
||||
WorkflowPage.getters.workflowMenu().click();
|
||||
WorkflowPage.getters.workflowMenuItemArchive().click();
|
||||
WorkflowPage.actions.acceptConfirmModal();
|
||||
|
||||
successToast().should('exist');
|
||||
cy.url().should('include', WorkflowPages.url);
|
||||
|
||||
// Return back to the workflow
|
||||
cy.go('back');
|
||||
|
||||
WorkflowPage.getters.archivedTag().should('be.visible');
|
||||
WorkflowPage.getters.nodeCreatorPlusButton().should('not.exist');
|
||||
WorkflowPage.getters.isWorkflowDeactivated();
|
||||
|
||||
// Delete the workflow
|
||||
WorkflowPage.getters.workflowMenu().should('be.visible');
|
||||
WorkflowPage.getters.workflowMenu().click();
|
||||
WorkflowPage.getters.workflowMenuItemDelete().click();
|
||||
WorkflowPage.actions.acceptConfirmModal();
|
||||
successToast().should('exist');
|
||||
cy.url().should('include', WorkflowPages.url);
|
||||
});
|
||||
|
||||
it('should archive nonactive workflow and then unarchive it', () => {
|
||||
WorkflowPage.actions.saveWorkflowOnButtonClick();
|
||||
WorkflowPage.getters.archivedTag().should('not.exist');
|
||||
|
||||
// Archive the workflow
|
||||
WorkflowPage.getters.workflowMenu().should('be.visible');
|
||||
WorkflowPage.getters.workflowMenu().click();
|
||||
WorkflowPage.getters.workflowMenuItemArchive().click();
|
||||
|
||||
successToast().should('exist');
|
||||
cy.url().should('include', WorkflowPages.url);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user