Skip to content

feat: add testID prop for E2E testing#46

Open
cyril36 wants to merge 1 commit into
amitpdev:mainfrom
cyril36:feat/testid-support
Open

feat: add testID prop for E2E testing#46
cyril36 wants to merge 1 commit into
amitpdev:mainfrom
cyril36:feat/testid-support

Conversation

@cyril36
Copy link
Copy Markdown

@cyril36 cyril36 commented May 16, 2026

Summary

  • Adds an optional testID prop to GooglePlacesTextInput
  • Propagates it as a suffix to all internal components (container, input wrapper, TextInput, clear button, loading indicator, suggestions container, suggestions list, and individual suggestion items)
  • Enables reliable element selection in E2E tests (Maestro, Detox, etc.)

When testID="address" is passed, internal elements become textinput-address, suggestion-touchableopacity-0-address, clear-button-address, etc. When testID is omitted, the suffix is empty, preserving the existing behaviour.

Test plan

  • Render the component without testID and confirm no behavioural change
  • Render with testID="foo" and verify each internal element exposes the expected suffixed testID
  • Run an existing Maestro/Detox flow that targets the input by testID

🤖 Generated with Claude Code

Adds an optional `testID` prop to GooglePlacesTextInput that is propagated
as a suffix to all internal components (container, input wrapper, text input,
clear button, loading indicator, suggestions container, suggestions list,
and individual suggestion items), enabling reliable selection in E2E tests
such as Maestro and Detox.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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