Add auto capitalization unit tests#4168
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| char adjustedCharacter = applyAutoCapitalization(area, character, current, cursor); | ||
| StringBuilder sb = new StringBuilder(current.length() + 1); | ||
| sb.append(current, 0, cursor); | ||
| sb.append(character); | ||
| sb.append(adjustedCharacter); |
There was a problem hiding this comment.
Auto-capitalization not triggered for TextField key presses
The new auto-capitalization helper is only invoked inside insertCharacter, which is reached from the editString TextArea branch. The editString TextField branch still routes key presses through TextField.insertChars without ever calling this helper, so dispatching key presses while editing a TextField leaves the text lowercase. The newly added AutoCapitalizationSampleTest constructs a TextField and expects initial-caps behavior on sentences and words, so both tests will fail because the capitalization logic never runs for that code path.
Useful? React with 👍 / 👎.
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Summary
Testing
Codex Task