diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 3841688..a3ed00e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -17,11 +17,8 @@ jobs: with: node-version: '20' - - name: Install dependencies - run: npm install --legacy-peer-deps - - - name: Install Playwright Browsers - run: npx playwright install --with-deps + - name: Install dependencies + run: npm install - name: Run Playwright tests run: npm run test diff --git a/package.json b/package.json index 8b75215..f40c365 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "build": "next build", "start": "next start", "lint": "next lint", - "test": "playwright test", - "test:ui": "playwright test --ui", - "test:debug": "playwright test --debug", - "install": "npm install --legacy-peer-deps" + "pretest": "npx playwright install --with-deps", + "test": "playwright test", + "test:ui": "playwright test --ui", + "test:debug": "playwright test --debug" }, "dependencies": { "@hello-pangea/dnd": "^17.0.0", diff --git a/playwright.config.ts b/playwright.config.ts index 7fadb3a..e406d39 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,36 +1,36 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from "@playwright/test"; export default defineConfig({ - testDir: './tests', + testDir: "./tests", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, - reporter: 'html', + reporter: "html", use: { - baseURL: 'http://localhost:3000', - trace: 'on-first-retry', - screenshot: 'only-on-failure', + baseURL: "http://localhost:3000", + trace: "on-first-retry", + screenshot: "only-on-failure", }, projects: [ { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + name: "chromium", + use: { ...devices["Desktop Chrome"] }, }, { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, + name: "firefox", + use: { ...devices["Desktop Firefox"] }, }, { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, + name: "webkit", + use: { ...devices["Desktop Safari"] }, }, ], - webServer: { - command: 'npm run dev', - url: 'http://localhost:3000', - reuseExistingServer: !process.env.CI, - }, + // webServer: { + // command: 'npm run dev', + // url: 'http://localhost:3000', + // reuseExistingServer: !process.env.CI, + // }, });