In my previous post in this series detailing how I use CucumberJS, I addressed a few common bulid tools in JavaScript to automate the watching and running of tests. While beneficial to a proper agile workflow, I did not introduce any new concepts or development information directly associated with using CucumberJS, itself.
In this article, I intend to take on a pretty meaty subject - running your cukes in the browser. It is a subject I have grappled with for some time and have tried different solutions, eventually creating my own.
CucumberJS is built on Node. As such, the CLI tool that we have been running to verify our tests in previous articles is living in that environment.
This is well and good if we were creating an application that was intended to live within Node. However, what if we are building an application that is to live inside the browser, which is often the case for me as a, primarily, Front End Developer? How do we go from Features detailing DOM interaction to passing Step Definitions that require a browser environment using CucumberJS?