Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Feb 25, 2018
1 parent 3204a90 commit 1a99375
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 0 additions & 4 deletions tests/Range.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe('Range', () => {
const trackStyle = wrapper.find('.rc-slider-track > .rc-slider-track').at(0).props().style;
expect(trackStyle.left).toMatch('0%');
expect(trackStyle.width).toMatch('50%');
expect(trackStyle.visibility).toMatch('visible');
});

it('should render Multi-Range with value correctly', () => {
Expand All @@ -45,17 +44,14 @@ describe('Range', () => {
const track1Style = wrapper.find('.rc-slider-track > .rc-slider-track').at(0).props().style;
expect(track1Style.left).toMatch('0%');
expect(track1Style.width).toMatch('25%');
expect(track1Style.visibility).toMatch('visible');

const track2Style = wrapper.find('.rc-slider-track > .rc-slider-track').at(1).props().style;
expect(track2Style.left).toMatch('25%');
expect(track2Style.width).toMatch('25%');
expect(track2Style.visibility).toMatch('visible');

const track3Style = wrapper.find('.rc-slider-track > .rc-slider-track').at(2).props().style;
expect(track3Style.left).toMatch('50%');
expect(track3Style.width).toMatch('25%');
expect(track3Style.visibility).toMatch('visible');
});

it('should update Range correctly in controllered model', () => {
Expand Down
1 change: 0 additions & 1 deletion tests/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('Slider', () => {
const trackStyle = wrapper.find('.rc-slider-track').at(1).props().style;
expect(trackStyle.left).toMatch('0%');
expect(trackStyle.width).toMatch('50%');
expect(trackStyle.visibility).toMatch('visible');
});

it('increments the value when key "up" was pressed', () => {
Expand Down
8 changes: 4 additions & 4 deletions tests/__snapshots__/Range.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ exports[`Range should render Multi-Range with correct DOM structure 1`] = `
</div>
<div
class="rc-slider-track rc-slider-track-1"
style="visibility:visible;left:0%;width:0%"
style="left:0%;width:0%"
>
</div>
<div
class="rc-slider-track rc-slider-track-2"
style="visibility:visible;left:0%;width:0%"
style="left:0%;width:0%"
>
</div>
<div
class="rc-slider-track rc-slider-track-3"
style="visibility:visible;left:0%;width:0%"
style="left:0%;width:0%"
>
</div>
Expand Down Expand Up @@ -99,7 +99,7 @@ exports[`Range should render Range with correct DOM structure 1`] = `
</div>
<div
class="rc-slider-track rc-slider-track-1"
style="visibility:visible;left:0%;width:0%"
style="left:0%;width:0%"
>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/Slider.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`Slider should render Slider with correct DOM structure 1`] = `
</div>
<div
class="rc-slider-track"
style="visibility:visible;left:0%;width:0%"
style="left:0%;width:0%"
>
</div>
Expand Down

0 comments on commit 1a99375

Please sign in to comment.