fix: attempt fixing e2e tests

This commit is contained in:
Alex Grozav 2025-01-10 21:07:28 +02:00
parent 6ce0fb5177
commit b3e8c8b16a
3 changed files with 8 additions and 20 deletions

View file

@ -391,17 +391,8 @@ describe('NDV', () => {
}
// Correctly failing in V2 - due to floating navigation not updating the selected node
it('should traverse floating nodes with mouse', () => {
it.only('should traverse floating nodes with mouse', () => {
cy.createFixtureWorkflow('Floating_Nodes.json', 'Floating Nodes');
cy.ifCanvasVersion(
() => {},
() => {
// Needed in V2 as all nodes remain selected when clicking on a selected node
workflowPage.actions.deselectAll();
},
);
workflowPage.getters.canvasNodes().first().dblclick();
getFloatingNodeByPosition('inputMain').should('not.exist');
getFloatingNodeByPosition('outputMain').should('exist');
@ -448,14 +439,6 @@ describe('NDV', () => {
// Correctly failing in V2 - due to floating navigation not updating the selected node
it('should traverse floating nodes with keyboard', () => {
cy.createFixtureWorkflow('Floating_Nodes.json', 'Floating Nodes');
cy.ifCanvasVersion(
() => {},
() => {
// Needed in V2 as all nodes remain selected when clicking on a selected node
workflowPage.actions.deselectAll();
},
);
workflowPage.getters.canvasNodes().first().dblclick();
getFloatingNodeByPosition('inputMain').should('not.exist');
getFloatingNodeByPosition('outputMain').should('exist');
@ -582,7 +565,8 @@ describe('NDV', () => {
ndv.getters
.outputTableRow(1)
.should('include.text', '<?xml version="1.0" encoding="UTF-8"?> <library>');
.should('include.text', '<?xml version="1.0" encoding="UTF-8"?> <library>')
.realHover();
cy.document().trigger('keyup', { key: '/' });
ndv.getters.searchInput().filter(':focus').type('<lib');

View file

@ -381,6 +381,7 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
return;
}
workflowsStore.setNodePristine(node.name, false);
setNodeActiveByName(node.name);
}

View file

@ -31,6 +31,7 @@ import type {
IWorkflowDb,
IWorkflowTemplate,
NodeCreatorOpenSource,
NodeFilterType,
ToggleNodeCreatorOptions,
WorkflowDataWithTemplateId,
XYPosition,
@ -1554,13 +1555,15 @@ function registerCustomActions() {
registerCustomAction({
key: 'openSelectiveNodeCreator',
action: ({
creatorview: creatorView,
connectiontype: connectionType,
node,
}: {
creatorview: NodeFilterType;
connectiontype: NodeConnectionType;
node: string;
}) => {
void onOpenSelectiveNodeCreator(node, connectionType);
nodeCreatorStore.openSelectiveNodeCreator({ node, connectionType, creatorView });
},
});