angularjs - How do I test an element and its sub element without running into race conditions? -


i got test:

describe('news page', function () {     'use strict';      beforeeach(function () {         browser.ignoresynchronization = true;         browser.waitforangular();     });      it('should show first run page', function () {         var firstrun;          firstrun = browser.findelement(by.id('first-run'));         firstrun.findelement(by.tagname('h1')).then(function (greeting) {             expect(greeting.gettext()).tobe('welcome owncloud news app!');         });          expect(firstrun.isdisplayed()).tobe(true);     });  }); 

sometimes works, both tests fail. works if remove test greeting. if add console.log works, guess race condition. haven't been able find out how chain these things , how prevent race condition.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -