Skip to content
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

fix(editor): Properly update workflow info in main header #9789

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7dbb85f
fix(editor): Properly update workflow info in main header
cstuncsik Jun 18, 2024
f5d8097
fix(editor): Fix updating tags in main header
cstuncsik Jun 18, 2024
9287ae7
fix(editor): Fix loading workflow data and adding e2e test to editing…
cstuncsik Jun 18, 2024
ba88a1d
Merge remote-tracking branch 'origin/master' into pay-1684-bug-users-…
cstuncsik Jun 18, 2024
beb568a
Merge remote-tracking branch 'origin/master' into pay-1684-bug-users-…
cstuncsik Jun 19, 2024
a8841fa
fix(editor): Fix main header state by fetching workflow data also in …
cstuncsik Jun 19, 2024
b97d75e
Merge remote-tracking branch 'origin/master' into pay-1684-bug-users-…
cstuncsik Jun 20, 2024
aa3f920
fix(editor): Fix workflow initialization
cstuncsik Jun 20, 2024
0c57558
fix(editor): Change variable name
cstuncsik Jun 20, 2024
98272b8
fix(editor): Use UI store once
cstuncsik Jun 21, 2024
0355ca1
fix(editor): Making a composable for initializing workflow data
cstuncsik Jun 21, 2024
87045ac
fix(editor): Remove unnecessary store setter call
cstuncsik Jun 21, 2024
1bcc5fc
fix(editor): Move workflow initState to workflowHelpers
cstuncsik Jun 21, 2024
aa43e70
fix(editor): Move workflow addNodes function from NodeView
cstuncsik Jun 21, 2024
3e52040
fix(editor): Fetch active workflows on executions tab hard refresh
cstuncsik Jun 21, 2024
6a866c8
Merge remote-tracking branch 'origin/master' into pay-1684-bug-users-…
cstuncsik Jun 24, 2024
dcc70e5
fix(editor): Move more methods to node helpers from NodeView
cstuncsik Jun 24, 2024
d4c5d41
fix(editor): Fix e2e test
cstuncsik Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion cypress/e2e/20-workflow-executions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { RouteHandler } from 'cypress/types/net-stubbing';
import { WorkflowPage } from '../pages';
import { WorkflowExecutionsTab } from '../pages/workflow-executions-tab';
import executionOutOfMemoryServerResponse from '../fixtures/responses/execution-out-of-memory-server-response.json';
import { getVisibleSelect } from '../utils';

const workflowPage = new WorkflowPage();
const executionsTab = new WorkflowExecutionsTab();
Expand Down Expand Up @@ -136,15 +137,90 @@ describe('Current Workflow Executions', () => {
executionsTab.getters.executionListItems().eq(14).should('not.be.visible');
});

it('should show workflow data in executions tab after hard reload', () => {
it('should show workflow data in executions tab after hard reload and modify name and tags', () => {
executionsTab.actions.switchToExecutionsTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 2);

workflowPage.getters.workflowTags().click();
getVisibleSelect().find('li:contains("Manage tags")').click();
cy.get('button:contains("Add new")').click();
cy.getByTestId('tags-table').find('input').type('nutag').type('{enter}');
cy.get('button:contains("Done")').click();

cy.reload();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.workflowTags().click();
workflowPage.getters.tagsInDropdown().first().should('have.text', 'nutag').click();
workflowPage.getters.tagPills().should('have.length', 3);

let newWorkflowName = 'Renamed workflow';
workflowPage.actions.renameWorkflow(newWorkflowName);
workflowPage.getters.isWorkflowSaved();
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);

executionsTab.actions.switchToEditorTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 3);
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);

executionsTab.actions.switchToExecutionsTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 3);
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);

executionsTab.actions.switchToEditorTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 3);
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);

newWorkflowName = 'Renamed workflow renamed again';
workflowPage.actions.renameWorkflow(newWorkflowName);
workflowPage.getters.isWorkflowSaved();
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);
workflowPage.getters.workflowTags().click();
workflowPage.getters.tagsDropdown().find('.el-tag__close').first().click();
cy.get('body').click(0, 0);
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 2);

executionsTab.actions.switchToExecutionsTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 2);
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);

executionsTab.actions.switchToEditorTab();
checkMainHeaderELements();
workflowPage.getters.saveButton().find('button').should('not.exist');
workflowPage.getters.tagPills().should('have.length', 2);
workflowPage.getters
.workflowNameInputContainer()
.invoke('attr', 'title')
.should('eq', newWorkflowName);
});
});

Expand Down
Loading
Loading