fuck this
This commit is contained in:
parent
4bc766feb1
commit
fdf2b84178
1 changed files with 5 additions and 5 deletions
|
@ -1,21 +1,21 @@
|
||||||
import { _electron as electron } from "playwright";
|
import { _electron as electron } from "playwright";
|
||||||
import { test, expect } from "@playwright/test";
|
import { test, expect } from "@playwright/test";
|
||||||
import { join } from "path";
|
import { resolve } from "path";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
|
||||||
test("Launch electron app", async () => {
|
test("Launch electron app", async () => {
|
||||||
|
|
||||||
const paths = {
|
const paths = {
|
||||||
"mainBuild": join(__dirname, "../../build/"),
|
"mainBuild": resolve(__dirname, "../../build/"),
|
||||||
"main": join(__dirname, "../main"),
|
"main": resolve(__dirname, "../main"),
|
||||||
"root": join(__dirname, "../../"),
|
"root": resolve(__dirname, "../../"),
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(paths)
|
console.log(paths)
|
||||||
|
|
||||||
console.log(fs.readdirSync(paths.main))
|
console.log(fs.readdirSync(paths.main))
|
||||||
|
|
||||||
const electronApp = await electron.launch({ args: ['main.js'] });
|
const electronApp = await electron.launch({ args: ['build/index.js'], cwd: paths.root });
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue