Skip to content

Handle testID prop - #3838

Merged
m-bert merged 49 commits into
nextfrom
@mbert/test-ID
Dec 8, 2025
Merged

m-bert merged 49 commits into
nextfrom
@mbert/test-ID

Conversation

@m-bert

@m-bert m-bert commented Nov 25, 2025

Copy link
Copy Markdown
Collaborator

Description

This PR adds handling of testID property.

Test plan

yarn test api_v3

@m-bert
m-bert changed the base branch from next to @mbert/components-new-api November 25, 2025 15:45
Comment on lines +31 to +35
if (key === 'testID') {
res.gestureHandlerProps[key] = props[key];
// @ts-ignore FIXME(TS)
res.childProps[key] = props[key];
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is to use the same testID for both, component and gesture. This way, it is possible to use getByGestureTestId, which returns gesture, and locate component by the same ID (though I have not tested that with other testing tools).

If you can see that this fails, let me know.

Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>
Base automatically changed from @mbert/components-new-api to next December 3, 2025 16:05
@m-bert
m-bert requested a review from j-piasecki December 4, 2025 10:09
@m-bert
m-bert merged commit 6afb378 into next Dec 8, 2025
2 checks passed
@m-bert
m-bert deleted the @mbert/test-ID branch December 8, 2025 15:37
m-bert added a commit that referenced this pull request Aug 24, 2026
## Description

Two small cleanups:

- The path filter in `rngh-api-v3.yml` pointed at `API_V3.test.tsx`, but
the file is `api_v3.test.tsx` and GitHub path filters are
case-sensitive, so a PR touching only the v3 test suite never triggered
the workflow. The mismatch has been there since the workflow was added
in #3838. Also lowercased the pattern in the `yarn test` step to match
the file literally (it worked before only because jest matches patterns
case-insensitively).
- Removed `android/common/src/main/java/` from `files` in `package.json`
- the directory was deleted in #3544, npm silently ignores the unmatched
entry.

## Test plan

- `npx jest --listTests RelationsTraversal api_v3` still selects both
test files.
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.

2 participants