Skip to content
Browse files

Added test for issue #4801

  • Loading branch information...
1 parent ea5debd commit 43d8ad08903357ef2125b136ce0e3c0e5865ca21 @gseguin gseguin committed with Aug 23, 2012
Showing with 12 additions and 0 deletions.
  1. +6 −0 tests/unit/collapsible/collapsible_core.js
  2. +6 −0 tests/unit/collapsible/index.html
View
6 tests/unit/collapsible/collapsible_core.js
@@ -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();
}
]);
View
6 tests/unit/collapsible/index.html
@@ -142,6 +142,12 @@ <h2 id="qunit-userAgent"></h2>
<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 43d8ad0

Please sign in to comment.
Something went wrong with that request. Please try again.