Skip to content

Fix widget tests to compare text content instead of Finder equality#13

Open
cubic-dev-ai[bot] wants to merge 1 commit intosarahwithanhwilson-patch-2from
fix/widget-test-finder-equality
Open

Fix widget tests to compare text content instead of Finder equality#13
cubic-dev-ai[bot] wants to merge 1 commit intosarahwithanhwilson-patch-2from
fix/widget-test-finder-equality

Conversation

@cubic-dev-ai
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot commented Jan 28, 2026

Summary

  • Fixed test assertions that were incorrectly comparing Finder objects instead of actual widget text content
  • The previous implementation used expect(firstGame, firstGameAfterChange) which compared Finder equality rather than verifying the actual game text changed

Changes

  • Updated 'deletes game in show schedule' test to extract and compare text content
  • Updated 'generates new game' test to extract and compare text content
  • Updated 'replaces game and then gets new show' test to extract and compare text content
  • Changed the assertion at line 115 from equality check to isNot() to properly test replacement behavior

Test plan

  • Run flutter test test/widget_test.dart to verify all tests pass
  • Confirm tests now properly verify that game text changes after user interactions

🤖 Generated with Claude Code


Summary by cubic

Fixed widget tests to assert text content changes instead of comparing Finder objects, ensuring user interactions are verified correctly. Updated three tests to read Text.data and use isNot for replacement checks.

  • Bug Fixes
    • 'deletes game in show schedule': compare Text.data before and after tap.
    • 'generates new game': compare Text.data before and after "Get a new show".
    • 'replaces game and then gets new show': switch first assertion to isNot and compare Text.data across steps.

Written for commit 2202191. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 28, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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

Copy link
Copy Markdown
Author

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

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.

0 participants