From 76d8afa264cdde448837b38df38a30c96ca5f12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Sat, 4 Apr 2026 20:57:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=92=8CPlaywright=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 .env.test 测试环境配置文件 - 更新 playwright.config.ts 添加角色测试项目 - 配置测试用户密码为 Test@123 - 添加独立的角色测试项目配置 --- novalon-manage-web/.env.test | 10 ++++++++++ novalon-manage-web/playwright.config.ts | 15 +++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 novalon-manage-web/.env.test diff --git a/novalon-manage-web/.env.test b/novalon-manage-web/.env.test new file mode 100644 index 0000000..3026a06 --- /dev/null +++ b/novalon-manage-web/.env.test @@ -0,0 +1,10 @@ +# 测试环境配置 +VITE_API_BASE_URL=http://localhost:8084 +VITE_APP_TITLE=Novalon管理系统 - 测试环境 + +# 测试用户配置 +TEST_USER_PASSWORD=Test@123 + +# Playwright配置 +HEADLESS=true +SLOW_MO=0 diff --git a/novalon-manage-web/playwright.config.ts b/novalon-manage-web/playwright.config.ts index 62aeb2e..8765d22 100644 --- a/novalon-manage-web/playwright.config.ts +++ b/novalon-manage-web/playwright.config.ts @@ -53,6 +53,21 @@ export default defineConfig({ }, projects: [ + { + name: 'role-based-tests', + testDir: './e2e/role-based-tests/scenarios', + testMatch: /.*\.spec\.ts/, + use: { + ...devices['Desktop Chrome'], + launchOptions: { + args: [ + '--disable-blink-features=AutomationControlled', + '--disable-dev-shm-usage', + '--no-sandbox' + ] + } + }, + }, { name: 'chromium', use: {