Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests passing
  • Loading branch information
mmahalwy committed Jan 9, 2017
commit d43320de7a4a33b44318773978118045db32c109
2 changes: 1 addition & 1 deletion src/components/Audioplayer/ScrollButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ScrollButton = ({ shouldScroll, onScrollToggle }) => {
<Tooltip id="scroll-button-tooltip">
<LocaleFormattedMessage
id="player.scrollButtonTip"
defaultMessage={'Automatically scrolls to the currently playing ayah on transitions...'}
defaultMessage="Automatically scrolls to the currently playing ayah on transitions..."
/>
</Tooltip>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/Audioplayer/ScrollButton/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ describe('<ScrollButton />', () => {
it('should indicate that shouldScroll', () => {
makeComponent(true);

expect(component.find('label').first().props().className).to.contain('scroll');
expect(component.find('a').first().props().className).to.contain('scroll');
});

it('should not indicate that shouldScroll', () => {
makeComponent(false);

expect(component.find('label').first().props().className).not.to.contain('scroll');
expect(component.find('a').first().props().className).not.to.contain('scroll');
});

it('should call onScrollToggle when clicked', () => {
component.find('label').first().simulate('click');
component.find('a').first().simulate('click');

expect(onScrollToggle).to.have.been.called; // eslint-disable-line
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContentDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ export default class ContentDropdown extends Component {
<ul className="dropdown-menu" aria-labelledby="reciters-dropdown">
{
content.length &&
<MenuItem eventKey={1} onClick={this.handleRemoveContent}>
<LocaleFormattedMessage id={'setting.translations.removeAll'} defaultMessage="Remove all" />
<MenuItem onClick={this.handleRemoveContent}>
<LocaleFormattedMessage id="setting.translations.removeAll" defaultMessage="Remove all" />
</MenuItem>
}
<MenuItem header>
Expand Down
3 changes: 2 additions & 1 deletion src/components/ContentDropdown/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ describe('<ContentDropdown />', () => {
});

it('should remove all content', () => {
const removeAll = wrapper.find({ eventKey: 1 });
const removeAll = wrapper.find('a');

expect(removeAll.html()).to.contain('Remove all');

removeAll.simulate('click');
Expand Down
10 changes: 5 additions & 5 deletions tests/helpers/intl-enzyme-test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ import { mount, shallow } from 'enzyme';


// Create the IntlProvider to retrieve context for wrapping around.
var intlProvider = new IntlProvider({ locale: 'en' }, {});
var intl = intlProvider.getChildContext();
const intlProvider = new IntlProvider({ locale: 'en' }, {});
const intl = intlProvider.getChildContext();

/**
* When using React-Intl `injectIntl` on components, props.intl is required.
*/
function nodeWithIntlProp(node) {
return React.cloneElement(node, intl );
return React.cloneElement(node, intl);
}

/**
* Export these methods.
*/
export function shallowWithIntl(node) {
return shallow(nodeWithIntlProp(node), { context: intl });
return shallow(nodeWithIntlProp(node), { context: intl });
}

export function mountWithIntl(node) {
return mount(nodeWithIntlProp(node), {
context: intl ,
context: intl,
childContextTypes: { intl: intlShape }
});
}