test: Update 20-workflow-executions e2e tests for new canvas (#12136)

This commit is contained in:
Alex Grozav 2024-12-11 12:12:47 +02:00 committed by GitHub
parent 0468945c99
commit e6985f79db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View file

@ -30,6 +30,12 @@ export class WorkflowExecutionsTab extends BasePage {
actions = {
toggleNodeEnabled: (nodeName: string) => {
cy.ifCanvasVersion(
() => {},
() => {
cy.get('body').click(); // Cancel selection if it exists
},
);
workflowPage.getters.canvasNodeByName(nodeName).click();
cy.get('body').type('d', { force: true });
},

View file

@ -97,7 +97,7 @@ export class WorkflowPage extends BasePage {
disabledNodes: () =>
cy.ifCanvasVersion(
() => cy.get('.node-box.disabled'),
() => cy.get('[data-test-id="canvas-trigger-node"][class*="disabled"]'),
() => cy.get('[data-test-id*="node"][class*="disabled"]'),
),
selectedNodes: () =>
cy.ifCanvasVersion(

View file

@ -1485,6 +1485,13 @@ function unregisterCustomActions() {
unregisterCustomAction('showNodeCreator');
}
function showAddFirstStepIfEnabled() {
if (uiStore.addFirstStepOnLoad) {
void onOpenNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);
uiStore.addFirstStepOnLoad = false;
}
}
/**
* Routing
*/
@ -1547,6 +1554,7 @@ onMounted(() => {
onActivated(async () => {
addUndoRedoEventBindings();
showAddFirstStepIfEnabled();
});
onDeactivated(() => {