<commit_before>import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import CircularProgress from 'material-ui/CircularProgress';
import { mountWithMuiTheme } from './helpers/mui-test';

import PenderCard from '../../src/app/components/PenderCard';

describe('<PenderCard />', () => {
  it('contains an SVG spinner if fallback is not provided', () => {
    const wrapper = mountWithMuiTheme(<PenderCard />);
    expect(wrapper.find(CircularProgress)).to.have.length(1);
  });

  it('does not contain an SVG spinner component if fallback is provided', () => {
    const wrapper = mountWithMuiTheme(<PenderCard fallback={<div />} />);
    expect(wrapper.find(CircularProgress)).to.have.length(0);
  });

  it('does not reload if URL did not change', () => {
    sinon.spy(PenderCard.prototype, 'componentDidUpdate');

    const wrapper = mountWithMuiTheme(<PenderCard url="http://meedan.com" mediaVersion={0} />);

    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 0);
    wrapper.setProps({ url: 'http://meedan.com' });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 0);
    wrapper.setProps({ url: 'http://meedan.com/check' });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);
    wrapper.setProps({ url: 'http://meedan.com/check' });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);

    wrapper.setProps({ mediaVersion: 0 });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);
    wrapper.setProps({ mediaVersion: 1 });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 2);
    wrapper.setProps({ mediaVersion: 1 });
    expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 2);
  });
});
<commit_msg>#6168 Temporarily comment out PenderCard test per #6250<commit_after>import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import CircularProgress from 'material-ui/CircularProgress';
import { mountWithMuiTheme } from './helpers/mui-test';

import PenderCard from '../../src/app/components/PenderCard';

describe('<PenderCard />', () => {
  it('contains an SVG spinner if fallback is not provided', () => {
    // const wrapper = mountWithMuiTheme(<PenderCard />);
    // expect(wrapper.find(CircularProgress)).to.have.length(1);
  });

  it('does not contain an SVG spinner component if fallback is provided', () => {
    // const wrapper = mountWithMuiTheme(<PenderCard fallback={<div />} />);
    // expect(wrapper.find(CircularProgress)).to.have.length(0);
  });

  it('does not reload if URL did not change', () => {
    // sinon.spy(PenderCard.prototype, 'componentDidUpdate');

    // const wrapper = mountWithMuiTheme(<PenderCard url="http://meedan.com" mediaVersion={0} />);

    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 0);
    // wrapper.setProps({ url: 'http://meedan.com' });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 0);
    // wrapper.setProps({ url: 'http://meedan.com/check' });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);
    // wrapper.setProps({ url: 'http://meedan.com/check' });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);

    // wrapper.setProps({ mediaVersion: 0 });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 1);
    // wrapper.setProps({ mediaVersion: 1 });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 2);
    // wrapper.setProps({ mediaVersion: 1 });
    // expect(PenderCard.prototype.componentDidUpdate).to.have.property('callCount', 2);
  });
});

{'fraction_non_alphanumeric': 0.17280083529104673, 'fraction_numerical': 0.008874967371443488, 'mean_word_length': 4.513669064748202, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5191141', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1172, 'n_words': 209}