Add translations and testing framework.

This commit is contained in:
Patrick Fic
2025-03-12 14:53:02 -07:00
parent e0cec62e13
commit 776d152d88
23 changed files with 1334 additions and 33 deletions

21
src/main/index.test.ts Normal file
View File

@@ -0,0 +1,21 @@
import { _electron as electron } from "playwright";
import { test, expect } from "@playwright/test";
test("example test", async () => {
const electronApp = await electron.launch({ args: ["."] });
const isPackaged = await electronApp.evaluate(async ({ app }) => {
// This runs in Electron's main process, parameter here is always
// the result of the require('electron') in the main app script.
return app.isPackaged;
});
expect(isPackaged).toBe(false);
// Wait for the first BrowserWindow to open
// and return its Page object
const window = await electronApp.firstWindow();
await window.screenshot({ path: "intro.png" });
// close app
await electronApp.close();
});