From 231249b35745c9b2874f08a53c4c8cdbacbc0981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Thu, 14 Aug 2025 14:18:10 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=20Playwright=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在运行测试前添加环境变量输出,提高调试可读性 - 删除测试中不必要的日志输出 --- .github/workflows/playwright.yaml | 5 ++++- .vscode/extensions.json | 1 - tests/playwright/test-1.spec.ts | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml index c46680d..4aff01c 100644 --- a/.github/workflows/playwright.yaml +++ b/.github/workflows/playwright.yaml @@ -42,7 +42,10 @@ jobs: # - name: 📥 安装 Playwright 浏览器 # run: pnpm exec playwright install --with-deps - name: ▶️ 运行 Playwright 测试 - run: npx playwright test + run: | + echo "BASE_URL: ${{ needs.surge.outputs.url }}" + echo "───────────────────────────────" + npx playwright test env: BASE_URL: ${{ needs.surge.outputs.url }} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a243e3d..d916c9c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,7 +4,6 @@ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "simonhe.common-intellisense", - "antfu.file-nesting", "oxc.oxc-vscode" ] } diff --git a/tests/playwright/test-1.spec.ts b/tests/playwright/test-1.spec.ts index 30d5527..4f090e4 100644 --- a/tests/playwright/test-1.spec.ts +++ b/tests/playwright/test-1.spec.ts @@ -3,7 +3,6 @@ import { consola } from 'consola'; test('页面加载正常', async ({ page }, testInfo) => { await page.goto('/Home'); - consola.info(`page.url() === ${page.url()}`); // await expect(page.getByRole('link', { name: '中文-页面.page.vue' })).toBeVisible();