Add playwright E2E tests (#2174)

This commit is contained in:
Sam Freund
2025-12-04 22:25:48 -06:00
committed by GitHub
parent f821657d2b
commit 017b074eae
18 changed files with 421 additions and 46 deletions

View File

@@ -0,0 +1,16 @@
import { test as base } from "@playwright/test";
import axios from "axios";
export const test = base.extend({
page: async ({ page }, use) => {
// Use the page in the test (no per-test backend reset here)
axios.defaults.baseURL = "http://localhost:5800/api/test";
await use(page);
}
});
test.beforeAll(async () => {
console.log("Running before all tests: Resetting backend state...");
await axios.post("http://localhost:5800/api/test/resetBackend");
await axios.post("http://localhost:5800/api/test/activateTestMode");
});