Skip to content

Commit 520cb2c

Browse files
committed
Fix testing errors related to Button component
1 parent ab37031 commit 520cb2c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/CheckboxTree.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ describe('<CheckboxTree />', () => {
313313

314314
describe('showExpandAll', () => {
315315
it('should render the expand all/collapse all buttons', () => {
316-
const wrapper = mount(
316+
const wrapper = shallow(
317317
<CheckboxTree
318318
nodes={[{ value: 'jupiter', label: 'Jupiter' }]}
319319
showExpandAll
@@ -327,7 +327,7 @@ describe('<CheckboxTree />', () => {
327327
describe('expandAll', () => {
328328
it('should add all parent nodes to the `expanded` array', () => {
329329
let actualExpanded = null;
330-
const wrapper = mount(
330+
const wrapper = shallow(
331331
<CheckboxTree
332332
nodes={[
333333
{
@@ -366,7 +366,7 @@ describe('<CheckboxTree />', () => {
366366
describe('collapseAll', () => {
367367
it('should remove all nodes from the `expanded` array', () => {
368368
let actualExpanded = null;
369-
const wrapper = mount(
369+
const wrapper = shallow(
370370
<CheckboxTree
371371
expanded={['mars', 'jupiter']}
372372
nodes={[
@@ -518,7 +518,7 @@ describe('<CheckboxTree />', () => {
518518
/>,
519519
);
520520

521-
wrapper.find('TreeNode .rct-collapse-btn').simulate('click');
521+
wrapper.find('TreeNode Button.rct-collapse-btn').simulate('click');
522522
assert.equal('jupiter', actualNode.value);
523523
});
524524
});

test/TreeNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe('<TreeNode />', () => {
133133
<TreeNode {...baseProps} expandDisabled rawChildren={[{ value: 'europa', label: 'Europa' }]} />,
134134
);
135135

136-
assert.isTrue(wrapper.find('button.rct-collapse-btn[disabled]').exists());
136+
assert.isTrue(wrapper.find('Button.rct-collapse-btn[disabled]').exists());
137137
});
138138
});
139139

0 commit comments

Comments
 (0)