The Spectron test that we have that checks that the browser window is
visible fails when ran inside a Windows Docker container.
In particular, the `isVisible()` function returns `false` when running
in a headless Windows machine.
However, the `isMinimized()` function returns `false`, the `isFocused()`
function returns `true`, and we can fetch the expected browser window
bounds, so we can use all those values in conjunction to reformulate the
test case and avoid `isVisible()`.
The results should be pretty much the same, and the assertions will pass
inside Docker Windows containers.
Changelog-entry: spectron: Make tests pass on Windows Docker containers
Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@balena.io>
- Add a `make test-spectron` target
- Install `spectron` and `mocha` (since we don't need to run the tests
inside an Electron instance like in the case of `electron-mocha`)
- Add some example tests
Fixes: https://github.com/resin-io/etcher/issues/1870
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>