From edabacfb3a7a327557d00da02dbdc5d7cac2c54d Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 26 Nov 2020 18:20:00 +0100 Subject: [PATCH] Fix spectron test to work on Windows in all cases Change-type: none --- tests/spectron/runner.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/spectron/runner.spec.ts b/tests/spectron/runner.spec.ts index f8973e8e..065c9fb0 100644 --- a/tests/spectron/runner.spec.ts +++ b/tests/spectron/runner.spec.ts @@ -46,7 +46,10 @@ describe('Spectron', function () { 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.isVisible()).to.be.true; + expect( + (await app.browserWindow.isVisible()) || + (await app.browserWindow.isFocused()), + ).to.be.true; }); it('should set a proper title', async () => {