Repository navigation
test(e2e): 手机账号菜单重开并重断言后再点击(#1391) - #1392
Merged
Merged
Conversation
Collaborator
|
Reviewed head All six required checks passed on this head ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 #1391:390px 手机视口下,账号菜单可能在链接断言通过后被异步 shell 同步关闭,导致 admin-area 用例在「全局设置」点击处耗尽 90s,或在链接断言处看到 0 个可见链接。
根因按检视结论修正:当前手机步骤停在
#/projects,真正关闭菜单的是 (1)setViewportSize引起的断点重同步(static/shell.js:564→syncConsoleShell),(2) 项目列表渲染后的后台权限刷新(static/app/project-rows.js:139-148→syncConsoleShell),并非personalCanManageApps。改动(仅 e2e 测试):
test/e2e/helpers/console-navigation.mjs新增openAccountMenu/clickAccountMenuEntry:每次尝试先重新打开菜单,再用 2s 短超时重新断言可见链接集合,随后点击;consoleNavigate手机分支复用同一打开逻辑。test/e2e/console/admin-area.spec.mjs超管段(F1)与项目管理员段(F2)改用上述片段;链接集合、URL、picker、#console-account-settings隐藏、scrollWidth 断言全部保留。验证:
npx playwright test -c test/e2e/playwright.config.mjs test/e2e/console/admin-area.spec.mjs --repeat-each 20→20 passed (15.7s)。2 passed)。8 passed (6.3s)。npm run check通过(850 个运行时 JS 文件语法检查)。风险:重试仍保持精确链接集合断言,仅在菜单被关闭时重开,最多 3-4 次、每次 2s,不会掩盖菜单内容错误;持续失败仍会以最后一次真实错误抛出。
Closes #1391
测试
由 agent 自报,平台未重跑。
提交:
eed1247e65bf2cbc62aaeef18df38dc1e33a938f