Sha256: a01628f45fb39b8584a83305d81a7f574697a444cc3234fc7f21d79333821e59

Contents?: true

Size: 1.1 KB

Versions: 65

Compression:

Stored size: 1.1 KB

Contents

import { prepareResult } from '../AnsibleRolesAndVariablesHelpers';

const bennojoy = { created_at: null, id: null, name: 'bennojoy.ntp' };
const gitRole = { created_at: null, id: null, name: '0ta2.git_role' };
const jriguera = { created_at: null, id: null, name: 'jriguera.monit' };
const rows = [
  {
    cells: [
      'bennojoy.ntp',
      'Update Role Variables',
      'Add: 1 Remove: 2 ',
      '',
      '',
    ],
    kind: 'old',
    id: 'bennojoy.ntp',
    role: bennojoy,
    selected: true,
  },
  {
    cells: ['0ta2.git_role', 'Import Role ', 'Add: 5 ', '', ''],
    kind: 'new',
    id: '0ta2.git_role',
    role: gitRole,
    selected: true,
  },
  {
    cells: ['jriguera.monit', 'Import Role ', 'Add: 12 ', '', ''],
    kind: 'new',
    id: 'jriguera.monit',
    role: jriguera,
  },
];

const result = {
  old: {
    'bennojoy.ntp': bennojoy,
  },
  new: {
    '0ta2.git_role': gitRole,
  },
};

describe('AnsibleRolesAndVariablesHelpers', () => {
  describe('prepareResult', () => {
    it('should return correct results', () => {
      expect(prepareResult(rows)).toStrictEqual(result);
    });
  });
});

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
foreman_ansible-15.0.2 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-15.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-15.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.2.2 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.2.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.7 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.2.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.1.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.1.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.5 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-14.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.4 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.3 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.2 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-13.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-12.0.7 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-10.4.4 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.8 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-12.0.6 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js