Visual Review Toolbar: Create Testing Plan and Implement Setup

Summary

We have moved the Visual Review tools to their own project. (This one!) Now we need to setup tests. The primary problem is how do we test vanilla Javascript where the HTML elements are created as template strings, so we can't mount mocks in our tests? I am thinking some JS-based headless/integration testing, but I am open to expert advice hint, hint.

A good goal is to keep this as close to the main Gitlab app as possible, so developers are not totally confused if they do work over here.

Previous Summary (for reference)

The Visual Review Toolbar is in the unique position of not being part of the Gitlab app. It is also vanilla Javascript. That means the testing story is still pretty unclear. While we are working on a single test to check that the script loads without throwing a runtime error (gitlab-ce!28013), we do need to make a more robust testing plan.

As the discussion in gitlab-ce!28013 indicates, we could create an end-to-end suite to test the UI. We could also look at unit tests, once the script is modularized via gitlab-ce!29433, although I would need a little help to figure out the best way to unit test imperative, non-library, DOM-heavy Javascript.

Edited by Sarah Groff Hennigh-Palermo