Skip to content

Commit

Permalink
Merge pull request #835 from MikuroXina/fix/test
Browse files Browse the repository at this point in the history
Replace Electron test with Playwright
  • Loading branch information
dherman authored Dec 5, 2021
2 parents dae093f + 706de31 commit 7b164b9
Show file tree
Hide file tree
Showing 4 changed files with 3,138 additions and 3,291 deletions.
18 changes: 18 additions & 0 deletions test/electron/main.test.js
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!");
});
Loading

0 comments on commit 7b164b9

Please sign in to comment.