Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG]: SettingsPage.test.jsx "Clear All" tests fail on main — confirmation step not handled

クローズ 初心者向け
#283 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@RounakKumarAgarwal がすでに取り組んでいます。

2026年10月1日 から。

  • #286 @RounakKumarAgarwal による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
frontend, testing

調査の方向性

src/pages/SettingsPage.test.jsx から始め、npx vitest run src/pages/SettingsPage.test.jsx を実行して2つの失敗を再現します。Clear All のテストを、SettingsPage.jsx に記載されている確認動作と併せて読み、その後、確認が受け入れられるようにテストセットアップを更新します。3つすべてのテストがパスし、"cleared" ボタンのアサーションに到達すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
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
  1. On current main, run: npx vitest run src/pages/SettingsPage.test.jsx
  2. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/OrgExplorer のほかの issue

AOSSIE-Org/OrgExplorer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。