Is your feature request related to a problem? Please describe.
I would like to use Detox e2e testing for my NativeScript apps because I am not a fan of Appium. NativeScript core supports Appium (automationText) but that property doesn't work for standard Detox practices.
Describe the solution you'd like
I would like to add a testID property like in React Native projects that can be used in Detox. Using the same property name would mean the same testing techniques used in React Native tutorials would also apply to NativeScript apps.
Describe alternatives you've considered
NativeScript already has the automationText property which is pretty much for the same purpose but has been specific to Appium in the past. On Android, the automationText property only sets the content description, which works for Detox's by.label() matcher but not for by.id() (which is more standard it seems). We could set the tag as well as the content description at the same time then by.id() would work, but then there would be no differentiation between by.label() and by.id().
If we create a testID property the mappings would work like:
testID -> by.id()
automationText -> by.label()
If we modify the behavior of automationText the mappings would be:
automationText -> by.id()
automationText -> by.label()
One thing to note is that iOS already behaves like this because it sets the accessibilityIdentifier and accessibilityLabel at the same time.
Additional context
Detox Matcher Docs
Is your feature request related to a problem? Please describe.
I would like to use Detox e2e testing for my NativeScript apps because I am not a fan of Appium. NativeScript core supports Appium (
automationText) but that property doesn't work for standard Detox practices.Describe the solution you'd like
I would like to add a
testIDproperty like in React Native projects that can be used in Detox. Using the same property name would mean the same testing techniques used in React Native tutorials would also apply to NativeScript apps.Describe alternatives you've considered
NativeScript already has the
automationTextproperty which is pretty much for the same purpose but has been specific to Appium in the past. On Android, theautomationTextproperty only sets the content description, which works for Detox'sby.label()matcher but not forby.id()(which is more standard it seems). We could set the tag as well as the content description at the same time thenby.id()would work, but then there would be no differentiation betweenby.label()andby.id().If we create a
testIDproperty the mappings would work like:testID->by.id()automationText->by.label()If we modify the behavior of
automationTextthe mappings would be:automationText->by.id()automationText->by.label()One thing to note is that iOS already behaves like this because it sets the
accessibilityIdentifierandaccessibilityLabelat the same time.Additional context
Detox Matcher Docs