[BUG]: SettingsPage.test.jsx "Clear All" tests fail on main — confirmation step not handled
维护者通常 3 天内回复
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 90/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
从 src/pages/SettingsPage.test.jsx 开始,运行 npx vitest run src/pages/SettingsPage.test.jsx 以复现两个失败。结合 SettingsPage.jsx 中描述的确认行为阅读 Clear All 测试,然后更新测试设置,使确认得到接受。当三个测试全部通过并到达 "cleared" 按钮断言时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Bug Description
Two of the three tests in src/pages/SettingsPage.test.jsx fail on current main. The
"Clear All" tests wait for a button labeled "cleared" to appear after clicking "Clear all":
expect(await screen.findByRole('button', { name: /cleared/i })).toBeInTheDocument()
This times out. It looks like #267 (two-step confirmation for destructive actions)
changed the Clear All flow — there's now a confirmation step before the action completes —
but the test wasn't updated to click through the new confirmation, so it never reaches
the "cleared" state.
Steps to Reproduce
- On current main, run: npx vitest run src/pages/SettingsPage.test.jsx
- Observe 2 of 3 tests fail at the findByRole('button', { name: /cleared/i }) assertion.
Logs and Screenshots
FAIL src/pages/SettingsPage.test.jsx
❯ findByRole('button', { name: /cleared/i }) timed out
at src/pages/SettingsPage.test.jsx:59
Tests 2 failed | 1 passed (3)
Environment Details
- Branch: main (with #267 merged)
- Node.js: 22.17.0
- Root cause: #267 added
window.confirm('Clear all cached data?')at the start of
handleClear in SettingsPage.jsx. The test (added in an earlier PR) clicks "Clear All"
but doesn't handle the new confirm dialog, so handleClear returns early and never
reaches the "Cleared" state. Fix: the test should mock window.confirm to return true.
Impact
Medium - Feature works but has issues
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- 主要语言
- JavaScript
- 星标
- 45
- 派生
- 148
- 平均合并
- 5 天 15 小时
- 30 天内合并 PR
- 28
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AOSSIE-Org/OrgExplorer 的其他 Issue
-
[BUG]: Eliminate render-blocking CDN stylesheet for SocialShareButton in index.html可能已有人在做 @garv3143 今天认领。 未关闭bug enhancement
难度 1/5 1-3 小时 新手友好度 72/100
AOSSIE-Org/OrgExplorer#395 · 1 条评论 ·
维护者通常 3 天内回复
-
[BUG]: Complete Analysis can silently skip repositories when the PAT has access to private repos可能已有人在做 @g-k-s-03 于 1 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
AOSSIE-Org/OrgExplorer#394 · 1 条评论 ·
维护者通常 3 天内回复
-
[BUG]: Average PR Merge Time is underestimated when a merged PR has an invalid or negative duration可能已有人在做 @g-k-s-03 于 1 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
AOSSIE-Org/OrgExplorer#393 · 1 条评论 ·
维护者通常 3 天内回复
-
[FEATURE]: Hide organisation filter in Contributors tab when only one organisation is selected可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 74/100
AOSSIE-Org/OrgExplorer#384 · 2 条评论 ·
维护者通常 3 天内回复
-
[FEATURE]: Show GitHub Repository Button When Selecting an Organization可能已有人在做 @kul-91 于 2 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 68/100
AOSSIE-Org/OrgExplorer#382 · 1 条评论 ·
维护者通常 3 天内回复
查看 AOSSIE-Org/OrgExplorer 的全部 Issue
相似的 Issue
-
⚠ needs intervention document not found
难度 2/5 1-3 小时 新手友好度 68/100
OpenTermsArchive/contrib-declarations#4151 ·
维护者通常 1 天内回复
-
correction via-web
难度 2/5 1-3 小时 新手友好度 67/100
ch-bas/cctv-camera-database#416 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
jeremysball/taskferry#622 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
coollabsio/openclaw#114 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug effort:medium model:light tests
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复