cells-back-compatibility-apps

1.2.0 • Public • Published

Compatibility backwards for all the apps

Repo with the functional tests for back compatibility in all the apps of BBVA.

Configure the tests

In the apps-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:

    const flowsToTest = () => {
      return [
        {
          name: 'clean',
          exec: clean,
          timeout: 500000
        }, {
          name: 'build',
          exec: build,
          timeout: 500000
        }, {
          name: 'validate',
          exec: validate,
          timeout: 500000
        }
      ];
    };

    In this case we have configured the flows clean, build and validate.

  • testApps: array with the config of the apps to test. Example:

    const testApps = [
      {
        name: 'MyBusiness.es',
        type: 'novulcanize',
        config: 'config-dev',
        platforms: 'webapp'
      },
      {
        name: 'glomo-bridge.gb',
        type: 'novulcanize',
        config: 'global/artichoke',
        platforms: 'webapp'
      }
    ];
  • setPisco: function that set the bin/pisco.js

    const setPisco = () => {
      if (!process.env.piscoExec) {
        process.env.piscoExec = 'node /Users/albertoeyocastro-rial/sngular/wk-cells/cells-workspace/tools/cells-cli/bin/pisco.js';
      }
    };

    We have to remember that wen this module is executed from the outside, the value of this variable will be the piscosour executable of the recipe to be tested.

Testing the apps

If we like to test the apps configured in the previous section, we launch simply npm test

Including new apps to test the compability

Include new apps to test is very simple. First of all we have to include in the dev-dependencies this new app. In order to do so we execute:

npm i --save-dev git+${routeToApp}

Example:

npm i --save git+ssh://git@globaldevtools.bbva.com:7999/bbvacellsapp/enginevents.git

In the testApps object, we include the configuration of this app:

const testApps = [
  {
    name: 'MyBusiness.es',
    type: 'novulcanize',
    config: 'config-dev',
    platforms: 'webapp'
  },
  {
    name: 'glomo-bridge.gb',
    type: 'novulcanize',
    config: 'global/artichoke',
    platforms: 'webapp'
  },
  {
    name: 'enginevents',
    type: 'vulcanize',
    config: 'dev',
    platforms: 'webapp'
  }
];

Now we can see the results of this new app too:

Results with the new app

Package Sidebar

Install

npm i cells-back-compatibility-apps

Weekly Downloads

4

Version

1.2.0

License

none

Last publish

Collaborators

  • alberto.eyo.contractor