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

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -