Skip to content

Commit

Permalink
FIX reactstrap#1847: passes attributes to nested Progress bar component
Browse files Browse the repository at this point in the history
  • Loading branch information
watinha committed Jul 5, 2020
1 parent ef152de commit c9d8604
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Progress.js
Expand Up @@ -77,6 +77,7 @@ const Progress = (props) => {

const ProgressBar = multi ? children : (
<div
{...attributes}
className={progressBarClasses}
style={{
...style,
Expand Down
11 changes: 11 additions & 0 deletions src/__tests__/Progress.spec.js
Expand Up @@ -161,4 +161,15 @@ describe('Progress', () => {
expect(wrapper.find('.progress').hostNodes().length).toBe(1);
expect(wrapper.find('.progress-bar').hostNodes().length).toBe(5);
});

it('should render nested progress bars and id attribute', () => {
const wrapper = mount(
<Progress multi>
<Progress bar id="ruh-roh" />
</Progress>
);

expect(wrapper.find('.progress').hostNodes().length).toBe(1);
expect(wrapper.find('#ruh-roh').hostNodes().length).toBe(1);
});
});

0 comments on commit c9d8604

Please sign in to comment.