test(browser): flaky browser specs (WebKit drag, Firefox import waitForEvent)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, playwright, react
调研方向
Start with the drag test near line 256 and the press() helper near line 48 in tests/browser/menu-drag.spec.js. Reproduce with the provided Playwright command using WebKit and repeated runs; inspect other press() callers for one-time reads after 150 ms. Determine whether waiting for the chip result or confirming the drop target before release addresses the failure, then verify the flaky case no longer reproduces.
由索引模型根据 Issue 内容生成。
描述
The WebKit test "dragging still works › the Month chip by its handle, after its menu was used, moves to Rows" failed once on #415's CI and passed on the retry. The run was https://github.com/eizedev/pivotkit/actions/runs/43685334063, job "browser (webkit 1/2, React 19)". #415 touches neither the test nor the drag code.
Where: tests/browser/menu-drag.spec.js, in the test at line 256 and the press() helper at line 48.
What failed:
- The assertion before it passed: the dragged chip followed the pointer, and there was one
.pk-overlayafter the last move. chips(page, "rows")was still["City"], not["City", "Date by month of year"]. The check at line 263 reads the chips once, 150 ms aftermouse.up().
The cause is not confirmed yet. There are two candidates:
- On a busy runner the drop's state update is drawn more than 150 ms after the release, so the single read comes too early.
press()releases right after its last move. If WebKit fires mouseup before dnd-kit has recorded the Rows zone as the target, the drop lands nowhere.
Reproduce: npx playwright test tests/browser/menu-drag.spec.js -g "by its handle" --project=webkit --repeat-each=30 --retries=0, ideally under CPU load.
Fix:
- For candidate 1: wait for the result instead of reading it once, with
await expect.poll(() => chips(page, "rows")).toEqual(["City", MONTH]). Do the same for cols. - For candidate 2: in
press(), before the release, wait until the target zone shows that it will take the drop. - Check the other callers of
press()for the same one-time read after 150 ms.
- 主要语言
- JavaScript
- 星标
- 1
- 派生
- 1
- 平均合并
- 3 小时 34 分钟
- 30 天内合并 PR
- 213
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eizedev/pivotkit 的其他 Issue
-
area:server enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area:server bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
area:server enhancement
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
documentation idea
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
area:tests idea
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
channels:edit check:passed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
swc-project/swc-next-issues#490 ·
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 69/100
githubnext/gh-aw-workshop#5826 ·
维护者通常 1 天内回复