mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Testing: Add filter anymatch queries
sadly unrelated to the last update
This commit is contained in:
parent
85c5cf2212
commit
77f47651c8
@ -198,7 +198,7 @@ jQuery(function($){
|
|||||||
wo = this.wo,
|
wo = this.wo,
|
||||||
$table = this.$table,
|
$table = this.$table,
|
||||||
table = this.table;
|
table = this.table;
|
||||||
expect(34);
|
expect(37);
|
||||||
|
|
||||||
return QUnit.SequentialRunner(
|
return QUnit.SequentialRunner(
|
||||||
function(actions, assertions) {
|
function(actions, assertions) {
|
||||||
@ -285,6 +285,15 @@ jQuery(function($){
|
|||||||
).nextTask(
|
).nextTask(
|
||||||
function(){ ts.setFilters( table, ['', '', '', '', '5 - 100'] ); },
|
function(){ ts.setFilters( table, ['', '', '', '', '5 - 100'] ); },
|
||||||
function(){ assert.cacheCompare( table, 4, [5.95, 42.29, 9.99, 19.99, 15.89, 5.29, 14.19, 13.19, 55.2, 22.09], 'search range; ensure search filtered gets cleared', true ); }
|
function(){ assert.cacheCompare( table, 4, [5.95, 42.29, 9.99, 19.99, 15.89, 5.29, 14.19, 13.19, 55.2, 22.09], 'search range; ensure search filtered gets cleared', true ); }
|
||||||
|
).nextTask(
|
||||||
|
function(){ ts.setFilters( table, ['', '', '', '', '', '', '', '', '4:>40'] ); },
|
||||||
|
function(){ assert.cacheCompare( table, 3, [51, 45, 65], 'search "4:>40" in anyMatch', true ); }
|
||||||
|
).nextTask(
|
||||||
|
function(){ ts.setFilters( table, ['', '', '', '', '', '', '', '', '2:~aa'] ); },
|
||||||
|
function(){ assert.cacheCompare( table, 1, ['Philip Aaron Wong', 'Aaron', 'Brandon Clark', 'Martha'], 'search "2:~aa" in anyMatch', true ); }
|
||||||
|
).nextTask(
|
||||||
|
function(){ ts.setFilters( table, ['', '', '', '', '', '', '', '', '1:5 && 7:12'] ); },
|
||||||
|
function(){ assert.cacheCompare( table, 3, [45, 65], 'search "1:5 && 7:12" in anyMatch', true ); }
|
||||||
).nextTask( // test filter_startsWith (false by default)
|
).nextTask( // test filter_startsWith (false by default)
|
||||||
function(){
|
function(){
|
||||||
wo.filter_startsWith = false;
|
wo.filter_startsWith = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user