UNPKG

cells-component-back-compatibility

Version:

Repository where the functional tests of the components will be executed

80 lines (63 loc) 2.51 kB
### Compatibility backwards for some components of Cells catalog Repo with the functional tests for back compatibility in some of the Cells components of BBVA. #### Configure the tests In the `components-test.js` file we have several variables to configure in order to execute all the tests that we like. * `flowsToTest`: function that returns an array with the configuration of all the flows that you want to check. Example: ```javascript const flowsToTest = () => { return [ { name: 'validate', exec: validate, timeout: 500000 } ]; }; ``` In this case we have configured the flow `validate`. * `testComponents`: array with the config of the components to test. Example: ```javascript const testComponents = [ { name: 'cells-atom-button', url: 'ssh://git@globaldevtools.bbva.com:7999/ca/cells-atom-button.git' }, { name: 'cells-molecule-star-rating', url: 'ssh://git@globaldevtools.bbva.com:7999/bgcm/cells-molecule-star-rating.git' }, { name: 'cells-ajax-behavior', url: 'ssh://globaldevtools.bbva.com:7999/CBH/cells-ajax-behavior.git', disabled: true }, { name: 'cells-template-animation-behavior', url: 'ssh://git@globaldevtools.bbva.com:7999/cbh/cells-template-animation-behavior.git', disabled: true }, { name: 'bgadp-employees', url: 'ssh://git@globaldevtools.bbva.com:7999/bbvacellsapi/bgadp-employees.git', disabled: true }, { name: 'bgadp-investment-funds', url: 'ssh://git@globaldevtools.bbva.com:7999/bbvacellsapi/bgadp-investment-funds.git', disabled: true } ]; ``` NOTE: (20/06/2017) Behaviours and bgadp components are failing on structural-testing step because of a problem reported to catalog team. While this problem was not solved these components are going to be disabled. * `setPisco`: function that set the `bin/pisco.js` ```javascript const setPisco = () => { if (!process.env.piscoExec) { process.env.piscoExec = 'cells'; } }; ``` We have to remember that wen this module is executed from the [outside][1], the value of this variable will be the piscosour executable of the recipe to be tested. #### Testing the components If we like to test the components configured in the previous section, we launch simply `npm test` [1]: https://github.com/cellsjs/piscosour/blob/master/docs/developers/guides/16-testing.md#functionalTesting