fix(client): wait for a ready event in jQuery challenges

This commit is contained in:
Valeriy S
2018-12-11 07:33:05 +03:00
committed by Stuart Taylor
parent 83ef4ebee1
commit 3654f2a971

View File

@ -6,7 +6,7 @@ import {
takeEvery, takeEvery,
fork fork
} from 'redux-saga/effects'; } from 'redux-saga/effects';
import { channel } from 'redux-saga'; import { delay, channel } from 'redux-saga';
import { import {
challengeMetaSelector, challengeMetaSelector,
@ -110,6 +110,8 @@ function* ExecuteDOMChallengeSaga() {
yield fork(logToConsole, consoleProxy); yield fork(logToConsole, consoleProxy);
yield call(createTestFrame, state, ctx, consoleProxy); yield call(createTestFrame, state, ctx, consoleProxy);
// wait for a code execution on a "ready" event in jQuery challenges
yield delay(100);
const testResults = yield call(executeTests, (testString, testTimeout) => const testResults = yield call(executeTests, (testString, testTimeout) =>
Promise.race([ Promise.race([