diff --git a/app/static/playwright.config.ts b/app/static/playwright.config.ts index c12df636..c0f367f3 100644 --- a/app/static/playwright.config.ts +++ b/app/static/playwright.config.ts @@ -27,7 +27,8 @@ export default defineConfig({ /* Retry on CI only */ retries: process.env.CI ? 2 : 1, /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, + // workers: process.env.CI ? 1 : undefined, + fullyParallel: true, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ // reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ diff --git a/app/static/tests/e2e/index.etest.ts b/app/static/tests/e2e/index.etest.ts index 034f495a..6da8f724 100644 --- a/app/static/tests/e2e/index.etest.ts +++ b/app/static/tests/e2e/index.etest.ts @@ -3,17 +3,18 @@ import * as fs from "fs"; import { realisticFitData } from "./utils"; test.describe("Index tests", () => { - const tmpPath = "tmp"; + let tmpPath: string; - test.beforeAll(() => { + test.beforeEach(() => { + tmpPath = `${Math.random()}`; if (fs.existsSync(tmpPath)) { - fs.rmdirSync(tmpPath, { recursive: true }); + fs.rmSync(tmpPath, { recursive: true }); } fs.mkdirSync(tmpPath); }); - test.afterAll(() => { - fs.rmdirSync(tmpPath, { recursive: true }); + test.afterEach(() => { + fs.rmSync(tmpPath, { recursive: true }); }); test("renders heading", async ({ page }) => {