Commit Graph

36 Commits

Author SHA1 Message Date
Mrugesh Mohapatra
6c91f81b0e chore(deps): upgrade eslint, prettier & related packages 2021-03-11 12:19:42 +05:30
Oliver Eyton-Williams
fffc0e51ec chore(client): refactor & organise config (#40875) 2021-02-03 15:22:07 +05:30
Oliver Eyton-Williams
9df098953d Feat: editable dom element (#39341)
* feat: __testEditable allows editable region tests

It's not entirely isolated, but it makes it possible to select only the
element with id 'editable-only' which is built solely from code inside
the editable region.

* fix(client): missing editableContents -> ''

Previously it was added as the string 'undefined'

* fix: more informative error messages

* fix: DRY, correct and test getLines
2020-09-16 11:54:11 +05:30
Oliver Eyton-Williams
68b223322f feat: make editable code available in tests 2020-09-16 11:54:09 +05:30
Oliver Eyton-Williams
4de5c5fde3 fix: concat sources so that 'code' has them all 2020-09-16 11:54:03 +05:30
mrugesh
22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30
Oliver Eyton-Williams
c6eb40ceef feat: remove protection from interview prep (#38136)
The interview prep section includes many challenges that require long
running calculations which can be mistaken for infinite loops. This
removes the loop protection from those challenges, while the tests are
being evaluated.

It keeps the protection for the preview, since it is easy to create
broken code while working on a challenge and that should not crash the
site.
2020-02-04 10:33:56 +05:30
Oliver Eyton-Williams
f5feff386a fix: stop user code after 500ms of execution
Code like `var xs = []; while(true){ xs.push(1) }` can quickly run the
browser out of memory causing it to crash.  These changes stop user loops
from running indefinitely so that common mistakes will no longer cause
the browser to crash.

Also, the user is informed if a long running loop is detected (js and
jsx challenges) during preview or testing.  Before this there was no
protection for js challenges and no information was given to the
user if they had created such a loop.

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
Co-Authored-By: mrugesh <1884376+raisedadead@users.noreply.github.com>
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
2020-01-03 11:41:52 +05:30
Oliver Eyton-Williams
e5abfa15ad Revert "fix: stop user code after 100ms of execution" (#37965)
This reverts commit 01b37f664f.
2019-12-21 11:09:32 +05:30
Oliver Eyton-Williams
01b37f664f fix: stop user code after 100ms of execution (#37841)
Co-authored-by: mrugesh <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2019-12-20 19:28:17 +05:30
Oliver Eyton-Williams
febba792e7 fix: allow log in testString, restrict test errors
Console logs from testString get reported and test errors are sent to
the dev console (JS).

challenge building is only attempted if there is a build function to do
so.

Various functions have been renamed to better reflect what they do.
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
beecb04c1a fix: report errors thrown after the frame is ready
Certain challenges involve code that is not run until the user
interacts with the preview (typically via a click listener). This uses
consoleProxy to report those errors.

Error logging has been simplified, reducing the number of places errors
can be reported from.

Some of the redux-saga code has been renamed in an attempt to improve
clarity.
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
04d2de96df fix: conditionally log non-assertion errors (JS)
console.logs and errors are only reported during the first evaluation of
the user's code.  This is because the code is evaluated for each test,
but the logs will not change between the build phases of the tests.

Errors thrown during testing (except failing assertions) are always
reported. This is to inform the user that their code is faulty, rather
than that it does not meet the challenge's requirements.
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
9a97d639f5 fix: add dynamic output for legacy challenges
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
64fcbbb491 fix: output console.logs as user types (JS) 2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
29641986ab fix: output console.logs as user types (DOM)
Any console.logs inside script tags will be written to the fcc console
as the user types.  DOM challenges only.

Also, DRYed out the main and test frame creation.
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
687c4fdb98 fix(client): add cache-busting hashes to chunks (#37746)
* fix(client): add cache-busting hashes to chunks

* fix: create cache-busting names for the workers

Prior to this PR the first webpack compilation gave the workers static
names.  This can cause caching problems, so this PR adds hashes to
their names to invalidate the cache.

In order for Gatsby to find them, the names are added to the
config directory.
2019-11-15 01:43:44 +05:30
Ahmad Abdolsaheb
a59b8636cb fix: restore preview background to white (#36714) 2019-08-29 18:45:32 +03:00
Ahmad Abdolsaheb
31e3d9b27e feat: commandline chic 2019-08-20 13:37:11 +05:30
Valeriy
839e81426e feat(client): show and execute backend project tests (#35673) 2019-06-11 21:16:36 +05:30
Valeriy S
845b966bda fix(client): execute web workers concurrently 2019-03-29 15:06:10 +05:30
Valeriy
fc8c71ad16 feat: use eslint with prettier to format code 2019-02-19 14:30:27 +05:30
Valeriy S
4c252654a4 fix(client): refactor a challenge preview saga 2019-02-16 17:48:37 +00:00
Valeriy S
98f979f3b4 fix(client): disable build on error 2019-02-16 17:48:37 +00:00
Valeriy S
e063686fca feat(tests): use client build pipeline and test runners for testing curriculum 2019-01-16 10:45:39 +00:00
Valeriy
7bfc733da6 fix(client): remove a dependency on the store from build challenges 2019-01-14 13:44:54 +00:00
Valeriy
66f14c8329 fix: throw on build errors 2019-01-14 13:44:54 +00:00
Valeriy S
f902a2e83a fix: refactoring build of pipeline 2019-01-14 13:44:54 +00:00
Valeriy S
2168b61151 fix: unify build of challenges 2019-01-14 13:44:54 +00:00
Valeriy S
7df4d06056 fix(client): refactor a test runner 2019-01-14 13:44:54 +00:00
Valeriy S
c43dfe1eb7 feat(client): execute backend challenge saga 2019-01-14 13:44:54 +00:00
Valeriy
786da39499 feat(client): bundling test dependencies 2018-12-09 10:38:10 +00:00
Valeriy S
2e598f692d fix(client): use babel polyfill for async 2018-12-09 10:38:10 +00:00
Valeriy
a4fd935b8b feat: execute js challenges saga 2018-12-06 13:05:09 +00:00
Valeriy
3123f8c5b9 fix(learn): transformers don't apply 2018-10-06 02:39:36 +01:00
Bouncey
5b254f3ad6 chore(learn): Merge learn in to the client app 2018-09-30 12:42:40 +01:00