-
Notifications
You must be signed in to change notification settings - Fork 285
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 #835 from MikuroXina/fix/test
Replace Electron test with Playwright
- Loading branch information
Showing
4 changed files
with
3,138 additions
and
3,291 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
|
||
const assert = require("assert"); | ||
const path = require("path"); | ||
|
||
const { _electron: electron } = require("playwright"); | ||
const { test } = require("@playwright/test"); | ||
|
||
test("greeting", async () => { | ||
const app = await electron.launch({ | ||
args: [path.join(__dirname, "main.js")], | ||
}); | ||
const page = await app.firstWindow(); | ||
const header = page.locator("#greeting"); | ||
const text = await header.textContent(); | ||
|
||
assert.strictEqual(text, "Hello, World!"); | ||
}); |
Oops, something went wrong.