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

Commit eb53dd8

Browse files
Extra testcase to avoid breaking the search filter with dividers expected behaviour in future refactorings
1 parent 338e5cb commit eb53dd8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/unit/listview/listview_core.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,19 @@
252252
start();
253253
}, 1000);
254254
});
255+
256+
asyncTest( "Dividers are hidden when preceding hidden rows and shown when preceding shown rows", function () {
257+
// wait for the page to become active/enhanced
258+
setTimeout(function(){
259+
$('.ui-page-active input').val('at');
260+
$('.ui-page-active input').trigger('change');
261+
}, 500);
262+
263+
setTimeout(function() {
264+
same($('.ui-page-active li[data-role=list-divider][style^="display: none;"]').length, 2);
265+
same($('.ui-page-active li[data-role=list-divider][style^="display: none;"] + li:not([data-role=list-divider])[style^="display: none;"]').length, 2);
266+
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);
267+
start();
268+
}, 1000);
269+
});
255270
})(jQuery);

0 commit comments

Comments
 (0)