Skip to content

Fix broken track sort test#144

Merged
phanan merged 1 commit intomasterfrom
fix/sort-by-track-test
Mar 28, 2026
Merged

Fix broken track sort test#144
phanan merged 1 commit intomasterfrom
fix/sort-by-track-test

Conversation

@phanan
Copy link
Copy Markdown
Member

@phanan phanan commented Mar 28, 2026

Summary

Test plan

  • flutter test passes

Summary by CodeRabbit

Release Notes

  • Tests
    • Updated sorting behavior verification for track-based organization, now properly accounting for both disc and track numbers as a composite value for more accurate sorting results.

The track sort now returns a disc+track composite string instead of
just the track number. Update the test expectation to match.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05b18a89-e186-42f8-97d7-76ff250685e3

📥 Commits

Reviewing files that changed from the base of the PR and between b45b3c4 and 368e612.

📒 Files selected for processing (1)
  • test/models/song_test.dart

📝 Walkthrough

Walkthrough

A test-only change in test/models/song_test.dart that updates the Song.valueToCompare test for track sorting. The test now verifies that sorting by track uses a composite string of zero-padded disc and track numbers instead of a simple numeric comparison.

Changes

Cohort / File(s) Summary
Test Updates for Song valueToCompare
test/models/song_test.dart
Updated PlayableSortConfig(field: 'track') test to assert a disc-track string composite (both values zero-padded to width 6) instead of simple numeric track comparison. Test description changed from "track sort" to "disc-track composite for track sort".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Padded with zeros, disc and track unite,
A composite string, left-aligned just right!
Six digits of harmony, side by side,
The sorting dance now has nowhere to hide. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix broken track sort test' is fully related to the main change—it describes the primary action of fixing a failing test for track sorting functionality.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sort-by-track-test

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.

@phanan phanan merged commit 5d127d6 into master Mar 28, 2026
2 checks passed
@phanan phanan deleted the fix/sort-by-track-test branch March 28, 2026 13:44
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