Skip to content

Commit

Permalink
Add background check to test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Oct 26, 2016
1 parent ef56d2d commit 306f21d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/slider/slider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ describe('MdSlider', () => {
expect(trackFillDimensions.width).toBe(sliderDimensions.width * 6 / 8);
expect(tickContainerDimensions.width)
.toBe(sliderDimensions.width - sliderDimensions.width * 6 / 8);
expect(tickContainerElement.style.background)
.toEqual(`repeating-linear-gradient(to right, black, black 2px, transparent 2px, ` +
`transparent ${sliderDimensions.width * 6 / 8 - 1}px)`);
});

it('should adjust thumb and ticks when max changes', () => {
Expand All @@ -344,6 +347,9 @@ describe('MdSlider', () => {
expect(trackFillDimensions.width).toBe(sliderDimensions.width * 6 / 12);
expect(tickContainerDimensions.width)
.toBe(sliderDimensions.width - sliderDimensions.width * 6 / 12);
expect(tickContainerElement.style.background)
.toEqual(`repeating-linear-gradient(to right, black, black 2px, transparent 2px, ` +
`transparent ${sliderDimensions.width * 6 / 12 - 1}px)`);
});
});

Expand Down

0 comments on commit 306f21d

Please sign in to comment.