-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #813 from th-ch/fix-tests
Bump electron and fix tests in CI
- Loading branch information
Showing
6 changed files
with
151 additions
and
2,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
/** | ||
* @jest-environment ./tests/environment | ||
*/ | ||
const path = require("path"); | ||
|
||
describe("YouTube Music App", () => { | ||
const app = global.__APP__; | ||
const { _electron: electron } = require("playwright"); | ||
const { test, expect } = require("@playwright/test"); | ||
|
||
test("With default settings, app is launched and visible", async () => { | ||
const window = await app.firstWindow(); | ||
const title = await window.title(); | ||
expect(title).toEqual("YouTube Music"); | ||
const appPath = path.resolve(__dirname, ".."); | ||
|
||
const url = window.url(); | ||
expect(url.startsWith("https://music.youtube.com")).toBe(true); | ||
test("YouTube Music App - With default settings, app is launched and visible", async () => { | ||
const app = await electron.launch({ | ||
args: [ | ||
"--no-sandbox", | ||
"--disable-gpu", | ||
"--whitelisted-ips=", | ||
"--disable-dev-shm-usage", | ||
appPath, | ||
], | ||
}); | ||
|
||
const window = await app.firstWindow(); | ||
const title = await window.title(); | ||
expect(title).toEqual("YouTube Music"); | ||
|
||
const url = window.url(); | ||
expect(url.startsWith("https://music.youtube.com")).toBe(true); | ||
|
||
await app.close(); | ||
}); |
Oops, something went wrong.