In this episode, we look at a React task, involving an interactive widget. Since it can be a lot of work to build a functional and presentable component, and many of the skills involved aren’t really related to React, the task is presented with a great deal of the boilerplate code already written.
So how does this assessment work? Great question! When running the tests, the user’s code is sent to a coderunner server, which uses a selenium browser to render the page elements. Since it actually loads the elements into the DOM (rather than just analyzing the source code), it’s possible to automate the browser to interact with the page, testing for the expected results (eg: adding a new named entry, then checking to see if the new element was successfully added to the DOM). And just like with all the other types of tasks, the results are quickly returned to the user, and presented in a nice visual format.
Since a front-end task like this involves running an automated browser to assess it, it generally takes a slightly longer time to run the tests, but it still only takes a few seconds to receive meaningful and descriptive feedback on the results.