The intern 2 documentation gives the following example of waiting for a condition to be true on a test page after loading it:
this.remote
.get(require.toUrl('./SomeTest.html'))
.then(pollUntil('return window.ready;', 5000));
Unfortunately, it doesn't explain how to load the pollUntil helper in order to use it in the previous example... Does anybody have a complete working example that uses pollUntil ?
Thanks for your help.
I think I found the answers: it works by loading module intern/dojo/node!leadfoot/helpers/pollUntil
, as in:
define([
'intern!object',
'intern/chai!assert',
'intern/dojo/node!leadfoot/helpers/pollUntil',
'../Request',
'require'
], function (registerSuite, assert, pollUntil, Request, require) {
intern 4 uses
define([
'dojo/request',
'dojo/node!@theintern/leadfoot/helpers/pollUntil'
],
function(request, _pollUntil) {
var pollUntil = _pollUntil.default;
var registerSuite = intern.getInterface('object').registerSuite;
var assert = intern.getPlugin('chai').assert;
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With