Skip to content

Commit 563fcc9

Browse files
committed
Add tests for bar_style and barClassName props of Progress
1 parent 75e5a0a commit 563fcc9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/components/__tests__/Progress.test.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,23 @@ describe('Progress', () => {
8686
expect(progressAnimated.firstChild).toHaveClass('progress-bar-animated');
8787
});
8888

89-
test('sets className and style on the progress container', () => {
89+
test('sets className and style on the progress container and the bar', () => {
9090
const {
9191
container: {firstChild: progress}
92-
} = render(<Progress style={{height: '40px'}} className="blorp" />);
92+
} = render(
93+
<Progress
94+
style={{height: '40px'}}
95+
className="outer"
96+
bar_style={{color: 'chartreuse'}}
97+
barClassName="inner"
98+
/>
99+
);
93100

94-
expect(progress).toHaveClass('blorp');
101+
expect(progress).toHaveClass('outer');
95102
expect(progress).toHaveStyle('height:40px');
103+
104+
expect(progress.firstChild).toHaveClass('progress-bar');
105+
expect(progress.firstChild).toHaveClass('inner');
106+
expect(progress.firstChild).toHaveStyle('color:chartreuse');
96107
});
97108
});

0 commit comments

Comments
 (0)