mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
17 lines
546 B
TypeScript
17 lines
546 B
TypeScript
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");
|
|
});
|