Skip to content

TCA-43 Fix the preprod issues #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions client/src/templates/Challenges/rechallenge/transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,24 @@ export const embedFilesInHtml = async function (challengeFiles) {
const style = contentDocument.createElement('style');
style.classList.add('fcc-injected-styles');
style.innerHTML = stylesCss?.contents;

link.parentNode.appendChild(style);

link.removeAttribute('href');
link.dataset.href = 'styles.css';
link.parentNode.replaceChild(style, link);
} else if (stylesCss?.contents) {
// automatic linking of style contents to html
const style = contentDocument.createElement('style');
style.classList.add('fcc-injected-styles');
style.innerHTML = stylesCss?.contents;
contentDocument.head.appendChild(style);
}
if (script) {
script.innerHTML = scriptJs?.contents;
script.removeAttribute('src');
script.setAttribute('data-src', 'script.js');
const newScript = contentDocument.createElement('script');
newScript.innerHTML = scriptJs?.contents;
script.parentNode.replaceChild(newScript, script);
}
if (indexJsx?.contents) {
// automatic linking of jsx to html
const newScript = contentDocument.createElement('script');
newScript.innerHTML = indexJsx?.contents;
contentDocument.head.appendChild(newScript);
}
return {
contents: documentElement.innerHTML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function* buildChallengeData(challengeData, options) {
}
}

function* executeTests(testRunner, tests, testTimeout = 5000) {
function* executeTests(testRunner, tests, testTimeout = 150000) {
const testResults = [];
for (let i = 0; i < tests.length; i++) {
const { text, testString } = tests[i];
Expand Down
2 changes: 1 addition & 1 deletion client/src/templates/Challenges/utils/worker-executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class WorkerExecutor {
}
}

execute(data, timeout = 1000) {
execute(data, timeout = 150000) {
const task = eventify({});
task._execute = function (getWorker) {
getWorker().then(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@
"dashedName": "front-end-development-libraries-projects",
"order": 6,
"time": "150 hours",
"template": "",
"required": [],
"template": "<body><div id='root'></div>${ source || '' }</body>",
"required": [
{
"link": "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css"
},
{
"src": "https://code.jquery.com/jquery-3.6.0.min.js"
},
{
"src": "https://unpkg.com/react@16.4.0/umd/react.production.min.js"
},
{
"src": "https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js"
},
{
"src": "https://cdnjs.cloudflare.com/ajax/libs/redux/3.7.2/redux.min.js"
},
{
"src": "https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.7/react-redux.min.js"
}
],
"superBlock": "front-end-development-libraries",
"challengeOrder": [
[
Expand Down
Loading