import path from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "../../frontend/node_modules/@playwright/experimental-ct-vue/index.js";

const testingDir = path.dirname(fileURLToPath(import.meta.url));

export default defineConfig({
  testDir: path.resolve(testingDir, "component"),
  retries: process.env.CI ? 1 : 0,
  use: {
    ctPort: 3100,
    ctTemplateDir: "../../frontend/playwright",
    viewport: { width: 1280, height: 900 },
  },
  reporter: [["list"], ["junit", { outputFile: path.resolve(testingDir, "../../build/junit-frontend-component.xml") }]],
});
