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.11.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.11.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.10.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.9.2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.10.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.10.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.4 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.9.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.3 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.9.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.7.6 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.9.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.9.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.7.5 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.0 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.0.rc2 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.7.4 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js
katello-4.8.0.rc1 webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js