Skip to content

Commit e84f045

Browse files
committed
Add simple test to ensure app launches properly
1 parent 692b6b2 commit e84f045

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/index.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
describe("YouTube Music App", () => {
2+
const app = global.__APP__;
3+
4+
test("With default settings, app is launched and visible", async () => {
5+
expect(app.isRunning()).toBe(true);
6+
7+
const win = app.browserWindow;
8+
9+
const isVisible = await win.isVisible();
10+
expect(isVisible).toBe(true);
11+
12+
const { width, height } = await win.getBounds();
13+
expect(width).toBeGreaterThan(0);
14+
expect(height).toBeGreaterThan(0);
15+
16+
const { client } = app;
17+
const title = await client.getTitle();
18+
expect(title).toEqual("YouTube Music");
19+
});
20+
});

0 commit comments

Comments
 (0)