Skip to content

Commit

Permalink
Added test for issue jquery-archive#4801
Browse files Browse the repository at this point in the history
  • Loading branch information
gseguin authored and arschmitz committed Oct 16, 2012
1 parent ea5debd commit 43d8ad0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/collapsible/collapsible_core.js
Expand Up @@ -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();
}
]);
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/collapsible/index.html
Expand Up @@ -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>
Expand Down

0 comments on commit 43d8ad0

Please sign in to comment.