mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(editor): Fix NDV close after using input select (#7544)
This commit is contained in:
parent
784b43330b
commit
3b5e181e66
|
@ -42,7 +42,7 @@ describe('NDV', () => {
|
|||
ndv.getters.outputDisplayMode().should('have.length.at.least', 1).and('be.visible');
|
||||
});
|
||||
|
||||
it('should change input', () => {
|
||||
it('should change input and go back to canvas', () => {
|
||||
cy.createFixtureWorkflow('NDV-test-select-input.json', `NDV test select input ${uuid()}`);
|
||||
workflowPage.actions.zoomToFit();
|
||||
workflowPage.getters.canvasNodes().last().dblclick();
|
||||
|
@ -50,6 +50,9 @@ describe('NDV', () => {
|
|||
ndv.getters.inputOption().last().click();
|
||||
ndv.getters.inputDataContainer().find('[class*=schema_]').should('exist');
|
||||
ndv.getters.inputDataContainer().should('contain', 'start');
|
||||
ndv.getters.backToCanvas().click();
|
||||
ndv.getters.container().should('not.be.visible');
|
||||
cy.shouldNotHaveConsoleErrors();
|
||||
});
|
||||
|
||||
it('should show correct validation state for resource locator params', () => {
|
||||
|
|
|
@ -161,3 +161,10 @@ Cypress.Commands.add('draganddrop', (draggableSelector, droppableSelector) => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('shouldNotHaveConsoleErrors', () => {
|
||||
cy.window().then((win) => {
|
||||
const spy = cy.spy(win.console, 'error');
|
||||
cy.wrap(spy).should('not.have.been.called');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,6 +37,7 @@ declare global {
|
|||
options?: { abs?: boolean; index?: number; realMouse?: boolean },
|
||||
): void;
|
||||
draganddrop(draggableSelector: string, droppableSelector: string): void;
|
||||
shouldNotHaveConsoleErrors(): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ export default defineComponent({
|
|||
return Math.min(this.runOutputIndex, this.maxOutputRun);
|
||||
},
|
||||
maxInputRun(): number {
|
||||
if (this.inputNode === null && this.activeNode === null) {
|
||||
if (this.inputNode === null || this.activeNode === null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ export default defineComponent({
|
|||
|
||||
const runData: IRunData | null = this.workflowRunData;
|
||||
|
||||
if (outputs.filter((output) => output !== NodeConnectionType.Main).length) {
|
||||
if (outputs.some((output) => output !== NodeConnectionType.Main)) {
|
||||
node = this.activeNode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue