Skip to content

Commit

Permalink
try fully parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Nov 7, 2024
1 parent 662c2d1 commit fa4afe1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/static/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
11 changes: 6 additions & 5 deletions app/static/tests/e2e/index.etest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down

0 comments on commit fa4afe1

Please sign in to comment.