@@ -152,16 +152,18 @@ describe('ProgressBar', function () {
152152 < ProgressBar min = { 1 } max = { 11 } now = { 6 } striped />
153153 ) ;
154154
155- assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b p r o g r e s s - s t r i p e d \b / ) ) ;
155+ assert . ok ( React . findDOMNode ( instance ) . firstChild . className . match ( / \b p r o g r e s s - b a r - s t r i p e d \b / ) ) ;
156156 } ) ;
157157
158158 it ( 'Should show animated striped bar' , function ( ) {
159159 let instance = ReactTestUtils . renderIntoDocument (
160160 < ProgressBar min = { 1 } max = { 11 } now = { 6 } active />
161161 ) ;
162162
163- assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b p r o g r e s s - s t r i p e d \b / ) ) ;
164- assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b a c t i v e \b / ) ) ;
163+ const barClassName = React . findDOMNode ( instance ) . firstChild . className ;
164+
165+ assert . ok ( barClassName . match ( / \b p r o g r e s s - b a r - s t r i p e d \b / ) ) ;
166+ assert . ok ( barClassName . match ( / \b a c t i v e \b / ) ) ;
165167 } ) ;
166168
167169 it ( 'Should show stacked bars' , function ( ) {
@@ -182,6 +184,28 @@ describe('ProgressBar', function () {
182184 assert . equal ( bar2 . style . width , '30%' ) ;
183185 } ) ;
184186
187+ it ( 'Should render active and striped children in stacked bar too' , function ( ) {
188+ let instance = ReactTestUtils . renderIntoDocument (
189+ < ProgressBar >
190+ < ProgressBar active key = { 1 } now = { 50 } />
191+ < ProgressBar striped key = { 2 } now = { 30 } />
192+ </ ProgressBar >
193+ ) ;
194+ let wrapper = React . findDOMNode ( instance ) ;
195+ let bar1 = wrapper . firstChild ;
196+ let bar2 = wrapper . lastChild ;
197+
198+ assert . ok ( wrapper . className . match ( / \b p r o g r e s s \b / ) ) ;
199+
200+ assert . ok ( bar1 . className . match ( / \b p r o g r e s s - b a r \b / ) ) ;
201+ assert . ok ( bar1 . className . match ( / \b a c t i v e \b / ) ) ;
202+ assert . ok ( bar1 . className . match ( / \b p r o g r e s s - b a r - s t r i p e d \b / ) ) ;
203+
204+ assert . ok ( bar2 . className . match ( / \b p r o g r e s s - b a r \b / ) ) ;
205+ assert . ok ( bar2 . className . match ( / \b p r o g r e s s - b a r - s t r i p e d \b / ) ) ;
206+ assert . notOk ( bar2 . className . match ( / \b a c t i v e \b / ) ) ;
207+ } ) ;
208+
185209 it ( 'allows only ProgressBar in children' , function ( ) {
186210 ReactTestUtils . renderIntoDocument (
187211 < ProgressBar >
0 commit comments