Skip to content

Commit

Permalink
Fix search tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patosai committed May 4, 2018
1 parent be13ae6 commit c8e8b31
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/integration/search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Search', () => {
// description
$("select").append("<option value='QRS' data-section='ttt/uuu/vvv' data-description='fox'></option>");

$("select").treeMultiselect({searchable: true});
$("select").treeMultiselect({searchable: true, enableSelectAll: true});

$input = $("input.search");
assert.equal($input.length, 1);
Expand Down Expand Up @@ -115,6 +115,15 @@ describe('Search', () => {
assert.equal(Common.selected().length, 0);
Common.sectionCheckbox({text: 's1'}).click();
assert.equal(Common.selected().length, 1);

$input.val('fox').trigger('input');
assert.equal(Common.selected().length, 1);
var $tttCheckbox = Common.sectionCheckbox({text: 'ttt'})
$tttCheckbox.click();
assert.equal(Common.selected().length, 2);

$tttCheckbox.click();
assert.equal(Common.selected().length, 1);
});

it('only adds filtered selections when selecting and unselecting all', () => {
Expand Down

0 comments on commit c8e8b31

Please sign in to comment.