mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 17:26:34 +00:00
Merge pull request #3189 from balena-io/windows-docker-spectron
spectron: Make tests pass on Windows Docker containers
This commit is contained in:
commit
5b509d147f
@ -51,7 +51,14 @@ describe('Spectron', function () {
|
||||
|
||||
describe('Browser Window', function () {
|
||||
it('should open a browser window', async function () {
|
||||
return expect(await app.browserWindow.isVisible()).to.be.true;
|
||||
// We can't use `isVisible()` here as it won't work inside
|
||||
// a Windows Docker container, but we can approximate it
|
||||
// with these set of checks:
|
||||
const bounds = await app.browserWindow.getBounds();
|
||||
expect(bounds.height).to.be.above(0);
|
||||
expect(bounds.width).to.be.above(0);
|
||||
expect(await app.browserWindow.isMinimized()).to.be.false;
|
||||
expect(await app.browserWindow.isFocused()).to.be.true;
|
||||
});
|
||||
|
||||
it('should set a proper title', async function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user