TLDR: Learn how to write Selenium tests using Node.js+WebdriverIO.
We are working on implementing Selenium tests in JavaScript. We are using WebdriverIO package and Node.js. You can follow progress at T139740: Port Selenium tests from Ruby to Node.js. I will update this task as the development progresses. Everything should be ready before the hackathon.
Example patches are in mediawiki/core and RelatedArticles.
Some documentation is available.