Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Collapsible: Make sure cue text is set during expand/collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Feb 4, 2014
1 parent 5e3ab06 commit 72376e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/integration/collapsible/collapsible_core.js
Expand Up @@ -7,8 +7,14 @@
function testExpandCollapse( selector ) {
var collapsible = $( selector );
deepEqual( collapsible.hasClass( "ui-collapsible-collapsed" ), true, selector + " should be collapsed");
deepEqual( collapsible.find( "a span" ).text(),
$.mobile.collapsible.defaults.expandCueText,
"expand cue text should be set to default" );
$( selector + " >:header a" ).first().click();
deepEqual( collapsible.hasClass( "ui-collapsible-collapsed" ), false, selector + " should be expanded after click");
deepEqual( collapsible.find( "a span" ).text(),
$.mobile.collapsible.defaults.collapseCueText,
"collapse cue text should be set to default" );

collapsible.collapsible( "option", "expandedIcon", "arrow-up" );
deepEqual( $( selector + ">:header a" ).hasClass( "ui-icon-arrow-up" ), true, selector + " when expanded and after setting expanded icon to 'arrow-up' should have class ui-icon-arrow-up." );
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/collapsible/index.html
Expand Up @@ -55,7 +55,7 @@ <h3>Section B</h3>
<h4 class="ui-collapsible-heading ui-collapsible-heading-collapsed">
<a href="#" class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-left ui-icon-plus">
Heading
<div class="ui-collapsible-heading-status"> click to expand contents</div>
<span class="ui-collapsible-heading-status"> click to expand contents</span>
</a>
</h4>
<div class="ui-collapsible-content ui-collapsible-content-collapsed" aria-hidden="true">
Expand Down

0 comments on commit 72376e1

Please sign in to comment.