mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
test: Update 20-workflow-executions
e2e tests for new canvas (#12136)
This commit is contained in:
parent
0468945c99
commit
e6985f79db
|
@ -30,6 +30,12 @@ export class WorkflowExecutionsTab extends BasePage {
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
toggleNodeEnabled: (nodeName: string) => {
|
toggleNodeEnabled: (nodeName: string) => {
|
||||||
|
cy.ifCanvasVersion(
|
||||||
|
() => {},
|
||||||
|
() => {
|
||||||
|
cy.get('body').click(); // Cancel selection if it exists
|
||||||
|
},
|
||||||
|
);
|
||||||
workflowPage.getters.canvasNodeByName(nodeName).click();
|
workflowPage.getters.canvasNodeByName(nodeName).click();
|
||||||
cy.get('body').type('d', { force: true });
|
cy.get('body').type('d', { force: true });
|
||||||
},
|
},
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class WorkflowPage extends BasePage {
|
||||||
disabledNodes: () =>
|
disabledNodes: () =>
|
||||||
cy.ifCanvasVersion(
|
cy.ifCanvasVersion(
|
||||||
() => cy.get('.node-box.disabled'),
|
() => cy.get('.node-box.disabled'),
|
||||||
() => cy.get('[data-test-id="canvas-trigger-node"][class*="disabled"]'),
|
() => cy.get('[data-test-id*="node"][class*="disabled"]'),
|
||||||
),
|
),
|
||||||
selectedNodes: () =>
|
selectedNodes: () =>
|
||||||
cy.ifCanvasVersion(
|
cy.ifCanvasVersion(
|
||||||
|
|
|
@ -1485,6 +1485,13 @@ function unregisterCustomActions() {
|
||||||
unregisterCustomAction('showNodeCreator');
|
unregisterCustomAction('showNodeCreator');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showAddFirstStepIfEnabled() {
|
||||||
|
if (uiStore.addFirstStepOnLoad) {
|
||||||
|
void onOpenNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);
|
||||||
|
uiStore.addFirstStepOnLoad = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing
|
* Routing
|
||||||
*/
|
*/
|
||||||
|
@ -1547,6 +1554,7 @@ onMounted(() => {
|
||||||
|
|
||||||
onActivated(async () => {
|
onActivated(async () => {
|
||||||
addUndoRedoEventBindings();
|
addUndoRedoEventBindings();
|
||||||
|
showAddFirstStepIfEnabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
onDeactivated(() => {
|
onDeactivated(() => {
|
||||||
|
|
Loading…
Reference in a new issue