fix: Load remote resources even if expressions in non requried parameters resolve (#6987)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Mutasem Aldmour
2023-08-31 16:40:20 +02:00
committed by GitHub
parent 8cd4db0ab7
commit 8a8d4e8bb3
18 changed files with 478 additions and 25 deletions

View File

@@ -0,0 +1,32 @@
import { WorkflowPage, NDV } from '../pages';
const workflowPage = new WorkflowPage();
const ndv = new NDV();
describe('Resource Mapper', () => {
beforeEach(() => {
workflowPage.actions.visit();
});
it('should not retrieve list options when required params throw errors', () => {
workflowPage.actions.addInitialNodeToCanvas('E2e Test', {action: 'Resource Mapping Component'});
ndv.getters.resourceMapperFieldsContainer().should('be.visible').findChildByTestId('parameter-input').should('have.length', 2);
ndv.actions.setInvalidExpression('fieldId');
ndv.actions.refreshResourceMapperColumns();
ndv.getters.resourceMapperFieldsContainer().should('not.exist');
});
it('should retrieve list options when optional params throw errors', () => {
workflowPage.actions.addInitialNodeToCanvas('E2e Test', {action: 'Resource Mapping Component'});
ndv.getters.resourceMapperFieldsContainer().should('be.visible').findChildByTestId('parameter-input').should('have.length', 2);
ndv.actions.setInvalidExpression('otherField');
ndv.actions.refreshResourceMapperColumns();
ndv.getters.resourceMapperFieldsContainer().should('be.visible').findChildByTestId('parameter-input').should('have.length', 2);
});
});