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

Commit

Permalink
child row tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matfish2 committed Nov 14, 2017
1 parent d351a23 commit c9f1e05
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
39 changes: 38 additions & 1 deletion test/child-row.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe(suite + ': Child row', () => {
beforeEach(()=>{

setOptions({
childRow
childRow,
});

});
Expand Down Expand Up @@ -43,5 +43,42 @@ describe(suite + ': Child row', () => {
},done);
});

it('can programmaticaly open a child row', (done)=>{

vm().toggleChildRow(245);

run(function() {
count('.VueTables__child-row',1);
},done);
});

it('can programmaticaly close a child row', (done)=>{

click(firstRowToggler);

count('.VueTables__child-row',1);

vm().toggleChildRow(245);

run(function() {
count('.VueTables__child-row',0);
},done);
});

it('can use a user-defined key as a unique id', (done)=>{

setOptions({
childRow,
uniqueKey:'code'
});

vm().toggleChildRow('ZW');

run(function() {
count('.VueTables__child-row',1);
},done);

});


});
6 changes: 4 additions & 2 deletions test/setup/client-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import data from './example-data'
global.suite = 'Client';

global.run = function(cb, done) {
cb();
done();
setTimeout(()=>{
cb();
done();
}, 0);
}

beforeEach(function() {
Expand Down

0 comments on commit c9f1e05

Please sign in to comment.