ccswbs / testing

Testcafe-based test suite for hjckrrh.
GNU General Public License v3.0
0 stars 1 forks source link

Add eval code snippet to Actions.js as a function and use function in tests #64

Open mmafe opened 7 years ago

mmafe commented 7 years ago

@nevantan had a good idea - let's make the eval code snippet into an Actions.js function. This will allow us to change our method in future if we ever need to.

Format of Eval code snippet

await t
   .eval(() => new Promise(resolve => setInterval(function() {
      if(jQuery('#name-of-element').length > 0) resolve();
   }, 500)));