mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
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);
|
|
});
|
|
});
|