mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
fixed some failing listview tests
This commit is contained in:
parent
4126fbd29b
commit
5349e5876b
2 changed files with 16 additions and 16 deletions
|
|
@ -174,19 +174,19 @@
|
|||
</div>
|
||||
|
||||
<!-- Search bar filter with list-dividers -->
|
||||
<div data-role="page" id='search-filter-with-dividers-test'>
|
||||
<div data-role="header" data-position="inline">
|
||||
<div data-nstest-role="page" id='search-filter-with-dividers-test'>
|
||||
<div data-nstest-role="header" data-nstest-position="inline">
|
||||
<h1>Split List View</h1>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<ul data-role="listview" data-filter="true">
|
||||
<li data-role="list-divider">a</li>
|
||||
<div data-nstest-role="content">
|
||||
<ul data-nstest-role="listview" data-nstest-filter="true">
|
||||
<li data-nstest-role="list-divider">a</li>
|
||||
<li>a is for aquaman</li>
|
||||
<li data-role="list-divider">b</li>
|
||||
<li data-nstest-role="list-divider">b</li>
|
||||
<li>b is for batman</li>
|
||||
<li data-role="list-divider">c</li>
|
||||
<li data-nstest-role="list-divider">c</li>
|
||||
<li>c is for catwoman</li>
|
||||
<li data-role="list-divider">d</li>
|
||||
<li data-nstest-role="list-divider">d</li>
|
||||
<li>d is for darkwing</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
asyncTest( "Make the search filter page the actie page and enhance it correctly.", function() {
|
||||
asyncTest( "Make the search filter page the active page and enhance it correctly.", function() {
|
||||
setTimeout(function() {
|
||||
var $new_page = $('#search-filter-test');
|
||||
ok($new_page.find('input').length == 1);
|
||||
|
|
@ -233,8 +233,8 @@
|
|||
|
||||
setTimeout(function() {
|
||||
same($('.ui-page-active li[style^="display: none;"]').length, 4);
|
||||
same($('.ui-page-active li[data-role=list-divider][style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li:not([data-role=list-divider])[style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li:jqdata(role=list-divider)[style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li:not(:jqdata(role=list-divider))[style^="display: none;"]').length, 2);
|
||||
start();
|
||||
}, 1000);
|
||||
});
|
||||
|
|
@ -245,14 +245,14 @@
|
|||
$('.ui-page-active input').val('a');
|
||||
$('.ui-page-active input').trigger('change');
|
||||
}, 500);
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
same($('.ui-page-active input').val(), 'a');
|
||||
same($('.ui-page-active li[style^="display: none;"]').length, 0);
|
||||
start();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
|
||||
asyncTest( "Dividers are hidden when preceding hidden rows and shown when preceding shown rows", function () {
|
||||
// wait for the page to become active/enhanced
|
||||
setTimeout(function(){
|
||||
|
|
@ -261,9 +261,9 @@
|
|||
}, 500);
|
||||
|
||||
setTimeout(function() {
|
||||
same($('.ui-page-active li[data-role=list-divider][style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li[data-role=list-divider][style^="display: none;"] + li:not([data-role=list-divider])[style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li[data-role=list-divider]:not([style^="display: none;"]) + li:not([data-role=list-divider]):not([style^="display: none;"])').length, 2);
|
||||
same($('.ui-page-active li[:jqdata(role=list-divider)[style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li[:jqdata(role=list-divider)[style^="display: none;"] + li:not([:jqdata(role=list-divider))[style^="display: none;"]').length, 2);
|
||||
same($('.ui-page-active li[:jqdata(role=list-divider):not([style^="display: none;"]) + li:not([:jqdata(role=list-divider)):not([style^="display: none;"])').length, 2);
|
||||
start();
|
||||
}, 1000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue