test: drop MOICEN_E2E_EXPECTED_REAL_NAME; assert 欢迎回来 without real_name
Made-with: Cursor
This commit is contained in:
@@ -12,7 +12,7 @@ npx playwright test
|
||||
|
||||
走代理安装(默认 `http://localhost:7890`):`npm run install:with-proxy`
|
||||
|
||||
可选:复制 `.env.e2e.example` → `.env.e2e`,填写 **`MOICEN_E2E_UNIONID`**;若要断言首页展示 **本人姓名**,再加 **`MOICEN_E2E_EXPECTED_REAL_NAME`**(与库 `hty_users.real_name` 一致,如 `阿难`)。勿提交 `.env.e2e`。
|
||||
可选:复制 `.env.e2e.example` → `.env.e2e`,填写 **`MOICEN_E2E_UNIONID`**(仅此一项敏感凭据即可跑登录链与串号用例)。**不必**配置 `real_name`:姓名非唯一标识、会变,断言「欢迎回来」等 UI 即可。勿提交 `.env.e2e`。
|
||||
|
||||
用例概览:
|
||||
|
||||
@@ -20,13 +20,13 @@ npx playwright test
|
||||
|------|------|
|
||||
| `tests/guest-onboarding.spec.ts` | 未登录:仅见「请返回微信小程序完成登录」,不出现已登录工作台 |
|
||||
| `tests/home-shell.spec.ts` | `#app`、伪造 unionid 不白屏、`page_path` 净化 |
|
||||
| `tests/logged-in-and-isolation.spec.ts` | 需 Secret:登录后非访客态;URL 异主 unionid 剥离(串号防护);可选姓名断言 |
|
||||
| `tests/logged-in-and-isolation.spec.ts` | 需 Secret:登录后非访客态;异主 unionid 剥离;多角色选身份后见「欢迎回来」(不校验姓名) |
|
||||
|
||||
未配置 `MOICEN_E2E_UNIONID` 时,`logged-in-and-isolation` 内用例全部 skip。
|
||||
|
||||
## GitHub Actions
|
||||
|
||||
在 **Settings → Secrets → Actions** 配置 **`MOICEN_E2E_UNIONID`**(测试用户 `union_id`)。可选再配 **`MOICEN_E2E_EXPECTED_REAL_NAME`**,否则「欢迎回来 + 姓名」用例 skip。未配 unionid 时仅跑访客与壳层用例。
|
||||
在 **Settings → Secrets → Actions** 配置 **`MOICEN_E2E_UNIONID`** 即可。未配 unionid 时仅跑访客与壳层用例。
|
||||
|
||||
`workflow_dispatch` 可改目标 `base_url`;**默认定时:每天 06:30 UTC**(见 `.github/workflows/playwright-music-room.yml`)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user