Permalink
Browse files

Added test for issue #4801

  • Loading branch information...
gseguin committed Aug 23, 2012
1 parent 8550fae commit a3626b73028851778d6059fe1da08a94bdb5f33f
Showing with 12 additions and 0 deletions.
  1. +6 −0 tests/unit/collapsible/collapsible_core.js
  2. +6 −0 tests/unit/collapsible/index.html
@@ -208,6 +208,12 @@
ok( collapsibles.eq(1).find( ".ui-icon" ).hasClass( "ui-icon-minus" ), "Heading of second collapsible should have class ui-icon-minus");
ok( collapsibles.eq(2).find( ".ui-icon" ).hasClass( "ui-icon-arrow-r" ), "Heading of third collapsible should have class ui-icon-arrow-r");
ok( collapsibles.eq(3).find( ".ui-icon" ).hasClass( "ui-icon-arrow-d" ), "Heading of fourth collapsible should have class ui-icon-arrow-d");
+
+ // issue #4801: BEGIN
+ ok( collapsibles.eq(4).find( ".ui-icon" ).hasClass( "ui-icon-info" ), "Heading of fifth collapsible should have class ui-icon-info");
+ collapsibles.eq( 4 ).trigger( "expand" );
+ ok( collapsibles.eq(4).find( ".ui-icon" ).hasClass( "ui-icon-info" ), "Heading of fifth collapsible should STILL have class ui-icon-info after click");
+ // issue #4801: END
start();
}
]);
@@ -142,6 +142,12 @@ <h3>Section D</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
have the "collapsed" state; you need to expand the header to see me.</p>
</div>
+ <div data-nstest-role="collapsible" data-nstest-collapsed-icon="info" data-nstest-expanded-icon="info">
+ <h3>Section E</h3>
+
+ <p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I
+ have the "collapsed" state; you need to expand the header to see me.</p>
+ </div>
</div>
</div>

0 comments on commit a3626b7

Please sign in to comment.