test(browser): flaky browser specs (WebKit drag, Firefox import waitForEvent)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, playwright, react
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 1
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 250
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eizedev/pivotkit
-
accessibility area:react bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:tests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area:cli bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
area:cli enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:react enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in eizedev/pivotkit
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
mattabate/life-distributable#231 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sfbrigade/pocket-gardens#60 ·
Maintainers usually reply within 5 days
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3329 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
devarshishimpi/codra#178 ·
Maintainers usually reply within 1 day