Sha256: de5a84ec8a90d4bccf6ab6ad0a90c5110af08afff25ea9883d9bf66636468cd2

Contents?: true

Size: 813 Bytes

Versions: 160

Compression:

Stored size: 813 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import ProfileRpmCellFormatter from '../ProfileRpmsCellFormatter';
import { details } from '../../__tests__/moduleStreamDetails.fixtures';

describe('ProfileRpmCellFormatter', () => {
  it('should render and expand on click', () => {
    //  eslint-disable-next-line prefer-destructuring
    const rpms = details.profiles[0].rpms;
    const wrapper = shallow(<ProfileRpmCellFormatter
      rpms={rpms}
    />);

    expect(toJson(wrapper)).toMatchSnapshot();
    expect(wrapper.state('expanded')).toBeFalsy();
    expect(wrapper.state('showAmount')).toBe(10);
    wrapper.instance().onClick();
    expect(wrapper.state('expanded')).toBeTruthy();
    expect(wrapper.state('showAmount')).toBe(rpms.length);
  });
});

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
katello-4.14.2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.15.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.15.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.15.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.0.rc3 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.0.rc1.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.14.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.13.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.13.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.12.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.13.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.12.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.12.0.rc3 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.12.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.12.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.11.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.11.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js