Use compose UI#168
Closed
kirklandsign wants to merge 10 commits into
Closed
Conversation
The app was rewritten from View-based Java to Compose-based Kotlin. The tests were still using Espresso with View IDs which no longer exist. Changes: - Replace ActivityScenario with createAndroidComposeRule - Replace Espresso matchers with Compose semantics matchers - Use onNodeWithText/onNodeWithContentDescription instead of withId - Update dialog dismissal to use Compose AlertDialog button text - Simplify test structure while maintaining same test coverage
- Add scrollTrigger counter in ChatViewModel that increments on each token - Update ChatScreen LaunchedEffect to scroll on scrollTrigger changes - Add FocusManager and clickable modifier to clear focus when tapping outside the input field, which dismisses the keyboard
The BasicTextField was using the default primary color (blue) for the cursor while the text was white/black depending on theme. Added cursorBrush parameter with SolidColor(appColors.textOnInput) to ensure the cursor matches the text color.
- Add testTag("chat_input_field") to BasicTextField for reliable test access
- Create typeInChatInput() and clearChatInput() helper functions
- Improve waitForModelLoaded() to detect both success and error states
- Increase model loading timeout from 60s to 90s for slower devices
- Update all tests to use testTag-based text input instead of text matching
BasicTextField doesn't support performTextInput() without semantic actions,
so using testTag allows Compose testing framework to properly interact
with the text field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.