Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit dedefb8

Browse files
committed
fix test for nested loaders
1 parent f8860db commit dedefb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

__test__/BlockUi.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,25 +116,25 @@ describe('BlockUi', function() {
116116

117117
describe('the loader', () => {
118118
it('should append the Loader', () => {
119-
const message = shallow(<BlockUi blocking>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(0);
119+
const message = shallow(<BlockUi blocking>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(1).childAt(0);
120120

121121
expect(message.type()).to.equal(Loader);
122122
});
123123

124124
it('should append a custom Loader (element) if provided', () => {
125-
const message = shallow(<BlockUi blocking loader={<span />}>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(0);
125+
const message = shallow(<BlockUi blocking loader={<span />}>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(1).childAt(0);
126126

127127
expect(message.type()).to.equal('span');
128128
});
129129

130130
it('should append a custom Loader (string) if provided', () => {
131-
const message = shallow(<BlockUi blocking loader="span">Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(0);
131+
const message = shallow(<BlockUi blocking loader="span">Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(1).childAt(0);
132132

133133
expect(message.type()).to.equal('span');
134134
});
135135

136136
it('should append a custom Loader (component) if provided', () => {
137-
const message = shallow(<BlockUi blocking loader={Loader}>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(0);
137+
const message = shallow(<BlockUi blocking loader={Loader}>Yo!</BlockUi>).childAt(2).childAt(1).childAt(0).childAt(1).childAt(0);
138138

139139
expect(message.type()).to.equal(Loader);
140140
});

0 commit comments

Comments
 (0)