Sha256: b3ba237ca0339d6d4e10ccfebf98824733f5ce3e57a476768b4798b2b5914673

Contents?: true

Size: 1.29 KB

Versions: 23

Compression:

Stored size: 1.29 KB

Contents

import { testComponentSnapshotsWithFixtures } from '@theforeman/test';

import PreupgradeReports from '../PreupgradeReports';

import { preupgradeReports } from './PreupgradeReports.fixtures';

const csrfToken = 'xyz';
const newJobInvocationUrl = '/job_invocations/new';
const getPreupgradeReports = () => {};

const fixtures = {
  'should render when loaded with reports': {
    loading: false,
    error: {},
    preupgradeReports,
    csrfToken,
    newJobInvocationUrl,
    getPreupgradeReports,
    reportsExpected: true,
  },
  'should render when loaded without reports': {
    loading: false,
    error: {},
    preupgradeReports: [],
    csrfToken,
    newJobInvocationUrl,
    getPreupgradeReports,
    reportsExpected: true,
  },
  'should render when loading': {
    loading: true,
    error: {},
    preupgradeReports: [],
    csrfToken,
    newJobInvocationUrl,
    getPreupgradeReports,
    reportsExpected: false,
  },
  'should render error': {
    loading: false,
    error: {
      statusText: 'Internal server error',
      errorMsg: 'Well, this is embarassing',
    },
    preupgradeReports: [],
    csrfToken,
    newJobInvocationUrl,
    getPreupgradeReports,
    reportsExpected: false,
  },
};

describe('PreupgradeReports', () =>
  testComponentSnapshotsWithFixtures(PreupgradeReports, fixtures));

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_leapp-2.0.1 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-2.0.0 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-1.2.1 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-1.2.0 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.15 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-1.1.1 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-1.1.0 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-1.0.0 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.14 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.13 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.12 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.11 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.10 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.9 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.8 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.7 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.6 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.5 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.4 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js
foreman_leapp-0.1.3 webpack/components/PreupgradeReports/__tests__/PreupgradeReports.test.js