mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Add simple test to ensure app launches properly
This commit is contained in:
20
tests/index.test.js
Normal file
20
tests/index.test.js
Normal file
@ -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");
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user