angularjs - Determine if a table has rows of data or not using Protractor -
hello: have angular test includes table of data after search. so, need test if data exists or not , if does. please advise how can this. still learning how use "a promise" test true or false situations, plus gather data promise. so, please specifics on how accomplish this.
it('ensures there table loaded before moving on', function() { expect($('table').ispresent()).tobetruthy(); }); it('conditionally test stuff', function() { $$('table tr').count().then(function countrows(count) { if (count > 0) { // data exists } else { // no data found } }); });
Comments
Post a Comment