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-10.2.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-10.1.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-10.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-10.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.4 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-9.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.3 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-9.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.2 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-8.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-8.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.0.4 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.1.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.0.3 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.0.2 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.0.1 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-7.0.0 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-6.3.4 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js
foreman_ansible-6.3.3 webpack/components/AnsibleRolesAndVariables/__test__/AnsibleRolesAndVariablesHelpers.test.js