[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 を実行して2つの失敗を再現します。Clear All のテストを、SettingsPage.jsx に記載されている確認動作と併せて読み、その後、確認が受け入れられるようにテストセットアップを更新します。3つすべてのテストがパスし、"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
- スター
- 44
- フォーク
- 133
- 平均マージ
- 5日 5時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AOSSIE-Org/OrgExplorer のほかの issue
-
[FEATURE]: Add 1-click "Copy Markdown" to clipboard on Contributor Profile対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/OrgExplorer#366 ·
メンテナーはふだん 3 日以内に返信
-
[BUG]: computeHealthScore: NaN when repo.open_issues_count is missing and computeHealthScore: NaN when repo.pushed_at is missing or invalid対応中かも @PrithvijitBose が 16 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/OrgExplorer#287 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
[BUG]: Analytics page keeps the previous organization's pull request data after exploring a new org対応中かも @amanbn8 が 17 日前に担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AOSSIE-Org/OrgExplorer#272 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
[BUG]: Rate Limit Header Coercion to `0` / False Quota Exhaustion対応中かも @Devnil434 が 25 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AOSSIE-Org/OrgExplorer#251 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
[BUG]: CSV exports produce malformed files when fields contain commas or quotes対応中かも @Dotify71 が 27 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/OrgExplorer#245 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
AOSSIE-Org/OrgExplorer の issue をすべて見る
似ている issue
-
documentation good first issue theming
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
drevendev/PatchPitch#2 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
521xueweihan/HelloGitHub#4025 ·