From e84f04520165076fbe246b922ba3c2c3a712fc73 Mon Sep 17 00:00:00 2001 From: TC Date: Fri, 1 May 2020 18:58:08 +0200 Subject: [PATCH] Add simple test to ensure app launches properly --- tests/index.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/index.test.js diff --git a/tests/index.test.js b/tests/index.test.js new file mode 100644 index 00000000..9fd1d57b --- /dev/null +++ b/tests/index.test.js @@ -0,0 +1,20 @@ +describe("YouTube Music App", () => { + const app = global.__APP__; + + test("With default settings, app is launched and visible", async () => { + expect(app.isRunning()).toBe(true); + + const win = app.browserWindow; + + const isVisible = await win.isVisible(); + expect(isVisible).toBe(true); + + const { width, height } = await win.getBounds(); + expect(width).toBeGreaterThan(0); + expect(height).toBeGreaterThan(0); + + const { client } = app; + const title = await client.getTitle(); + expect(title).toEqual("YouTube Music"); + }); +});