mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
21 lines
607 B
JavaScript
21 lines
607 B
JavaScript
constants = require('../constants');
|
|
|
|
exports.command = function() {
|
|
return this
|
|
.timeoutsAsyncScript(constants.ASYNC_TIMEOUT)
|
|
.executeAsync(function(done) {
|
|
try {
|
|
window.currentModal.supermodel.finishLoading()
|
|
.then(function() { done(); })
|
|
.catch(function(e) { console.error('Promise error', e); done(e); });
|
|
}
|
|
catch (e) {
|
|
console.error('Caught error:', e);
|
|
done(e);
|
|
}
|
|
}, [], function(result) {
|
|
if(result.error)
|
|
console.log('waitForModalLoaded error:', result.error)
|
|
})
|
|
.pause(constants.PAUSE_TIME)
|
|
};
|