AdelRedaa97 / react-native-select-dropdown

react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
MIT License
320 stars 137 forks source link

TestID still not available #201

Open GibranPolonsky opened 1 month ago

GibranPolonsky commented 1 month ago

I'm working with: import {render} from '@testing-library/react-native'; apprently the testID is not available when i try to access it

My Implementation:

<RNSelectDropdown
            defaultValue={value}
            data={options}
            onSelect={(selectedOption: SelectItem) =>
              onChange(selectedOption.value)
            }
            testID='testing'
            onBlur={onBlur}
            renderButton={() => (
              <View style={styles.input}>
                <Text>
                  {options.find(option => option.value === value)?.label ||
                    placeholder}
                </Text>
              </View>
            )}
            renderItem={(item: SelectItem) => (
              <View style={styles.option}>
                <Text>{item.label}</Text>
              </View>
            )}
          />