-
Notifications
You must be signed in to change notification settings - Fork 108
Fix 'Scored less than' and 'Scored more than' labels in SpeedGrader E2E test #3425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n labels has changed).
🧪 Unit Test Results📊 Summary
Last updated: Mon, 01 Dec 2025 11:32:41 GMT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
This PR replaces hardcoded strings with string resources in E2E tests, which is a good practice for maintainability and internationalization support.
Positive Feedback
- ✅ Good improvement replacing hardcoded strings with string resources
- ✅ Properly imports and uses
getStringFromResourcehelper function - ✅ Follows existing patterns used elsewhere in the test codebase
Issues Found
- String mismatch concern (
SpeedGraderE2ETest.kt:193-194): The hardcoded strings had different capitalization and punctuation than the actual string resources:- Old:
"Scored Less Than…"(capital T, with ellipsis) - New:
"Scored Less than"(lowercase t, no ellipsis) - Old:
"Scored More Than…"(capital T, with ellipsis) - New:
"Scored More than"(lowercase t, no ellipsis)
- Old:
Action Required: Please verify that the UI actually displays these strings without ellipses (as defined in strings.xml:429-430). If the UI does show ellipses, either the test was previously correct and the string resources need updating, or there's a display transformation happening that wasn't accounted for in the test.
Test Coverage
No new test coverage needed - this is a refactoring of existing assertions.
| assignmentSubmissionListPage.assertSubmissionFilterOption("Graded") | ||
| assignmentSubmissionListPage.assertPreciseFilterOption("Scored Less Than…") | ||
| assignmentSubmissionListPage.assertPreciseFilterOption("Scored More Than…") | ||
| assignmentSubmissionListPage.assertPreciseFilterOption(getStringFromResource(R.string.scored_less_than)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded string was "Scored Less Than…" (with capital T and ellipsis), but the string resource R.string.scored_less_than is defined as "Scored Less than" (lowercase 't', no ellipsis) in strings.xml:429. This changes the test's behavior - it will now match the actual string resource value instead of the previous hardcoded value with different capitalization and punctuation. Please verify this is the intended behavior and that the UI actually displays the string without the ellipsis.
| assignmentSubmissionListPage.assertPreciseFilterOption("Scored Less Than…") | ||
| assignmentSubmissionListPage.assertPreciseFilterOption("Scored More Than…") | ||
| assignmentSubmissionListPage.assertPreciseFilterOption(getStringFromResource(R.string.scored_less_than)) | ||
| assignmentSubmissionListPage.assertPreciseFilterOption(getStringFromResource(R.string.scored_more_than)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as above - the hardcoded string was "Scored More Than…" (with capital T and ellipsis), but R.string.scored_more_than is "Scored More than" (lowercase 't', no ellipsis) per strings.xml:430. Please confirm the UI displays the string resource value without the ellipsis.
📊 Code Coverage Report✅ Student
✅ Teacher
|
Fix breaking SpeedGraderE2ETest (Scored less than and Scored more than labels has changed).