You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a custom component has a Pressable parent component and it has a CSS top style property set, its testID is supressed and is not shown as a resource-id when maestro hierarchy is run, as should be expected.
Although it may seem a bug related to Maestro, this issue indicates otherwise, and so I felt like an issue should be created here.
testID of all components should appear as resource-id in hierarchy regardless of the presence of CSS top style attribute or if it has a Pressable parent component in its parent tree.
Actual behaviour
testID not showing as a resource-id in the hierarchy if CSS top style attribute is informed and if it has a Pressable component in its parent tree.
Run maestro hierarchy | grep-id. You should see 2 lines with "resource-id" : "id-1", and "resource-id" : "id-2", respectively
Uncomment line 9 at SecondComponent.jsx to set property top: '100%'
Run ``again. Now you should see only "resource-id" : "id-1",
React Native Version
0.76.7
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: Linux 6.8 Pop!_OS 22.04 LTS
CPU: (8) x64 AMD Ryzen 5 3400G with Radeon Vega Graphics
Memory: 3.42 GB / 13.57 GB
Shell:
version: 5.1.16
path: /bin/bash
Binaries:
Node:
version: 20.14.0
path: ~/node-v20.14.0-linux-x64/bin/node
Yarn: Not Found
npm:
version: 10.7.0
path: ~/node-v20.14.0-linux-x64/bin/npm
Watchman:
version: 4.9.0
path: /usr/bin/watchman
SDKs:
Android SDK:
API Levels:
- "29"
- "33"
- "34"
- "35"
Build Tools:
- 30.0.3
- 33.0.3
- 34.0.0
- 35.0.0
- 35.0.1
System Images:
- android-22 | Google APIs Intel x86 Atom
- android-24 | Google APIs Intel x86 Atom
- android-35 | Google APIs Intel x86_64 Atom
- android-35 | Google Play Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 23.0.2
path: /usr/bin/javac
Ruby:
version: 3.4.2
path: /home/luca/.local/share/mise/installs/ruby/3.4.2/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.7
wanted: 0.76.7
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
It doesn't have a stacktrace/log besides the output of `maestro hierarchy`. The full output files are sent below.
Component(blue square) with top: '100%' uncommented
As it can be seen, in both cases the SecondComponent still appears at the screen, excluding the hypothesis
that its missing testID is due to it not being visible.
These are the full outputs of maestro hierarchy for when the line is uncommented and commented, respectively: uncommented.txt commented.txt
The text was updated successfully, but these errors were encountered:
Description
If a custom component has a
Pressable
parent component and it has a CSStop
style property set, itstestID
is supressed and is not shown as aresource-id
whenmaestro hierarchy
is run, as should be expected.Although it may seem a bug related to Maestro, this issue indicates otherwise, and so I felt like an issue should be created here.
These issues may be related: #32969 #39382
Desired behaviour
testID
of all components should appear asresource-id
in hierarchy regardless of the presence of CSStop
style attribute or if it has aPressable
parent component in its parent tree.Actual behaviour
testID
not showing as aresource-id
in the hierarchy if CSStop
style attribute is informed and if it has aPressable
component in its parent tree.Steps to reproduce
Run example repo
npm install
npx expo run:android
maestro hierarchy | grep-id
. You should see 2 lines with"resource-id" : "id-1",
and"resource-id" : "id-2",
respectivelySecondComponent.jsx
, where propertytop: '100%'
is setmaestro hierarchy | grep-id
again. Now you should see only"resource-id" : "id-1",
Creating a project from scratch
npx create-expo-app@latest
index.tsx
into thiscustom
folder inside/components
/components/custom
,FirstComponent.jsx
andSecondComponent.jsx
like this and this, respectivelynpx expo run:android
maestro hierarchy | grep-id
. You should see 2 lines with"resource-id" : "id-1",
and"resource-id" : "id-2",
respectivelySecondComponent.jsx
to set propertytop: '100%'
"resource-id" : "id-1",
React Native Version
0.76.7
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/lucartc/RNBug
Screenshots and Videos
Component(blue square) with
top: '100%'
commentedComponent(blue square) with
top: '100%'
uncommentedAs it can be seen, in both cases the
SecondComponent
still appears at the screen, excluding the hypothesisthat its missing
testID
is due to it not being visible.These are the full outputs of
maestro hierarchy
for when the line is uncommented and commented, respectively:uncommented.txt
commented.txt
The text was updated successfully, but these errors were encountered: