good
This commit is contained in:
parent
a85868a70c
commit
5ba21a6c17
1 changed files with 2 additions and 2 deletions
|
@ -2,14 +2,14 @@ import { _electron as electron } from "playwright";
|
||||||
import { test, expect } from "@playwright/test";
|
import { test, expect } from "@playwright/test";
|
||||||
|
|
||||||
test("Launch electron app", async () => {
|
test("Launch electron app", async () => {
|
||||||
const electronApp = await electron.launch({ args: ["./index.js"], cwd: "../build" });
|
const electronApp = await electron.launch({ args: ["./build/index.js"] });
|
||||||
|
|
||||||
const appPath = await electronApp.evaluate(async ({ app }) => {
|
const appPath = await electronApp.evaluate(async ({ app }) => {
|
||||||
// This runs in the main Electron process, parameter here is always
|
// This runs in the main Electron process, parameter here is always
|
||||||
// the result of the require('electron') in the main app script.
|
// the result of the require('electron') in the main app script.
|
||||||
return app.getAppPath();
|
return app.getAppPath();
|
||||||
});
|
});
|
||||||
console.log(appPath);
|
console.log(`cwd: ${appPath}`);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue