Skip to content

Commit 659f313

Browse files
committed
💚 Fix radioButtonGroup failed tests
1 parent 7d3662f commit 659f313

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/radioButtonGroup/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RadioButtonGroup extends React.Component {
3030
theme,
3131
} = this.props;
3232

33-
const classNames = cx(theme['radio-group'], { [theme.inline]: inline });
33+
const classNames = cx(theme['radio-group'], (inline ? `${theme.inline} inline` : ''));
3434

3535
const isChecked = label => label === this.state.currentlyActive ? 'active' : ''; // eslint-disable-line
3636

@@ -46,7 +46,7 @@ class RadioButtonGroup extends React.Component {
4646
id="radio_button"
4747
>
4848
<label className={cx(theme['customized-radio'], theme['customized-radio'])}>
49-
<label className={cx(theme.inner, { [theme.checked]: isChecked(option.label) })}>
49+
<label className={cx(theme.inner, 'inner', isChecked(option.label) ? `${theme.checked} checked` : '')}>
5050
<input type="radio" />
5151
</label>
5252
</label>

lib/radioButtonGroup/tests/accessibility.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { expect } from 'chai';
3-
import { mount } from 'enzyme';
3+
import { mount, shallow } from 'enzyme';
44
import RadioButtonGroup from '..';
55

66
/* eslint-disable no-undef */
@@ -18,7 +18,7 @@ describe('RadioButtonGroup accessibility tests', () => {
1818
];
1919

2020
beforeEach(() => {
21-
wrappedComponent = mount(<RadioButtonGroup options={options} />);
21+
wrappedComponent = mount(shallow(<RadioButtonGroup options={options} />).get(0));
2222
});
2323

2424
afterEach(() => {

0 commit comments

Comments
 (0)