diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 79873bf..5728594 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -39,7 +39,7 @@ jobs: # Step 4: Playwrightブラウザと必要な依存関係をインストール - name: Install Playwright Browsers - run: npx playwright install --with-deps + run: npm run install-playwright # Step 5: 実際のPlaywrightテストを実行 # package.jsonのtestスクリプト(playwright test)を実行 diff --git a/package.json b/package.json index 9eb0540..8ed1c8c 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "test:headed": "node_modules/.bin/playwright test --headed", "test:ui": "node_modules/.bin/playwright test --ui", "test:debug": "node_modules/.bin/playwright test --debug", - "serve": "npx http-server public -p 3000", - "install-playwright": "npx playwright install", + "serve": "http-server public -p 3000", + "install-playwright": "npx playwright install --with-deps", "build-for-pages": "mkdir -p dist && cp -r public/* dist/ && cp -r playwright-report dist/playwright-report" }, "keywords": [ @@ -22,7 +22,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.55.1", - "@types/node": "^24.6.1" + "@playwright/test": "^1.55.1" } } diff --git a/playwright.config.ts b/playwright.config.ts index e500619..edd0798 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -9,8 +9,6 @@ export default defineConfig({ reporter: [['html', { open: 'on-failure' }]], use: { baseURL: 'http://localhost:3000', - screenshot: 'only-on-failure', - video: 'retain-on-failure', trace: 'on-first-retry', }, @@ -32,7 +30,6 @@ export default defineConfig({ ], webServer: { - command: 'npx http-server public -p 3000', - port: 3000, + command: 'npm run serve', }, });