Detox+ native-base switch is not accessible by textID

27 views Asked by At

I tryed accessing to a native-base switch component via testID but it seems that component is not visible

Component Definition

        <HStack
          alignItems="center"
          justifyContent="space-between"
          mx="5"
          space="5"
          my="5"
        >
          <HStack space="5">
            <FontAwesomeIcon
              icon={faSparkles}
              size={20}
              color={theme.colors.primary[700]}
            />
            <Subtitle1>Yeppik suggestions</Subtitle1>
          </HStack>
         <Switch isChecked={grid} onToggle={handleToggleShowGrid} accessible={true} accessibilityLabel="yeppik_suggest_toggle" testID="yeppik_suggest_toggle"/>
        </HStack>```

**Detox Testing Code**


await waitFor(element(by.id('yeppik_suggest_toggle'))).toBeVisible().withTimeout(5000);
await element(by.id('yeppik_suggest_toggle')).longPress(); ```
0

There are 0 answers