Skip to content

フレイキーなユーザー登録テストを修正#9576

Merged
machida merged 1 commit intomainfrom
fix/flaky-registration-test
Feb 5, 2026
Merged

フレイキーなユーザー登録テストを修正#9576
machida merged 1 commit intomainfrom
fix/flaky-registration-test

Conversation

@machida
Copy link
Copy Markdown
Member

@machida machida commented Jan 30, 2026

Summary by CodeRabbit

  • テスト
    • ユーザー登録フローの検証ロジックを改善し、UIの適切性に対するテスト検証をより厳密にしました。

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot requested a review from komagata January 30, 2026 06:08
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

ウォークスルー

ユーザー登録システムテストの検証方法が変更されました。ページタイトルに基づいた完全な文字列チェックから、h1ヘッダー要素の存在確認へと変更され、テストの成功基準が更新されました。

変更内容

コホート / ファイル(s) サマリー
ユーザー登録テスト
test/system/users/registration_test.rb
ページタイトルの完全一致確認をh1要素(クラス auth-form__title、テキスト 'FBC参加登録')の存在確認に変更。テスト検証方法がDOM要素ベースへ転換。

推定コードレビュー工数

🎯 2 (Simple) | ⏱️ ~8 分

関連の可能性があるPR

  • tailwindのユーティリティクラスを優先させた #9566: 同一のテスト変更パターンで、システムテストの h1.auth-form__title 要素とテキスト "FBC参加登録" に基づくアサーション検証へと切り替えており、タイトル確認からヘッダーベースのCapybaraアサーション確認への同じ変更を実施。

推奨レビュアー

  • komagata
  • okuramasafumi

🐰 テストの目も新たに、
h1の輝く文字を追いかけて、
FBC登録への道は確か、
ヘッダーチェックで心安らか ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning プルリクエストの説明が提供されていません。リポジトリのテンプレートに従った説明(Issue番号、概要、変更確認方法、スクリーンショット等)が必要です。 説明テンプレートに従い、Issue番号、変更の概要、確認方法、スクリーンショットなどを追加してください。
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトルは「フレイキーなユーザー登録テストを修正」で、変更内容(不安定なテストの修正)を明確に説明しており、メインの変更に関連している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/flaky-registration-test

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

assert_equal titleはCapybaraの待機機能を使わないため、
ページロード前にtitleを読み取る場合があった。
assert_selectorに変更してページロード完了を確実に待つようにした。
@machida machida force-pushed the fix/flaky-registration-test branch from b709ce9 to 230dcfb Compare February 2, 2026 11:33
@machida machida removed the request for review from komagata February 5, 2026 10:24
@machida machida merged commit d2907e8 into main Feb 5, 2026
3 checks passed
@machida machida deleted the fix/flaky-registration-test branch February 5, 2026 10:24
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant