diff --git a/cypress/e2e/5-ndv.cy.ts b/cypress/e2e/5-ndv.cy.ts index ebb624d898..671b8287b3 100644 --- a/cypress/e2e/5-ndv.cy.ts +++ b/cypress/e2e/5-ndv.cy.ts @@ -1,5 +1,5 @@ import { getVisibleSelect } from '../utils'; -import { MANUAL_TRIGGER_NODE_DISPLAY_NAME } from '../constants'; +import { MANUAL_TRIGGER_NODE_DISPLAY_NAME, NOTION_NODE_NAME } from '../constants'; import { NDV, WorkflowPage } from '../pages'; import { NodeCreator } from '../pages/features/node-creator'; import { clickCreateNewCredential } from '../composables/ndv'; @@ -699,6 +699,23 @@ describe('NDV', () => { ndv.getters.parameterInput('operation').find('input').should('have.value', 'Delete'); }); + it('Should show error state when remote options cannot be fetched', () => { + cy.intercept('POST', '/rest/dynamic-node-parameters/options', { statusCode: 500 }).as( + 'parameterOptions', + ); + + workflowPage.actions.addInitialNodeToCanvas(NOTION_NODE_NAME, { + keepNdvOpen: true, + action: 'Update a database page', + }); + + ndv.actions.addItemToFixedCollection('propertiesUi'); + ndv.getters + .parameterInput('key') + .find('input') + .should('have.value', 'Error fetching options from Notion'); + }); + it('Should open appropriate node creator after clicking on connection hint link', () => { const nodeCreator = new NodeCreator(); const hintMapper = { diff --git a/cypress/pages/ndv.ts b/cypress/pages/ndv.ts index c654dc3c2c..1f189b01f4 100644 --- a/cypress/pages/ndv.ts +++ b/cypress/pages/ndv.ts @@ -131,6 +131,8 @@ export class NDV extends BasePage { nodeRunErrorIndicator: () => cy.getByTestId('node-run-info-danger'), nodeRunErrorMessage: () => cy.getByTestId('node-error-message'), nodeRunErrorDescription: () => cy.getByTestId('node-error-description'), + fixedCollectionParameter: (paramName: string) => + cy.getByTestId(`fixed-collection-${paramName}`), schemaViewNode: () => cy.getByTestId('run-data-schema-node'), schemaViewNodeName: () => cy.getByTestId('run-data-schema-node-name'), }; @@ -307,6 +309,9 @@ export class NDV extends BasePage { expressionSelectPrevItem: () => { this.getters.inlineExpressionEditorItemPrevButton().click(); }, + addItemToFixedCollection: (paramName: string) => { + this.getters.fixedCollectionParameter(paramName).getByTestId('fixed-collection-add').click(); + }, }; } diff --git a/packages/editor-ui/src/components/FixedCollectionParameter.vue b/packages/editor-ui/src/components/FixedCollectionParameter.vue index 5b63d266ef..68d74dd04f 100644 --- a/packages/editor-ui/src/components/FixedCollectionParameter.vue +++ b/packages/editor-ui/src/components/FixedCollectionParameter.vue @@ -1,5 +1,9 @@