Unable to find MenuOption by testID
plambir93kek opened this issue · 3 comments
plambir93kek commented
Hi, i use Jest framework and RNTL for e2e testing, and i faced with the problem.
No MenuOption
in snapshots, also unable to find MenuOption by testID after fireEvent.press(trigger).
Is there any way to have e2e tests with this library?
<MenuOption
customStyles={{ optionTouchable: { testID: 'option' }}}
disabled={isDisabled}
value={value}
onSelect={handleSelect}>
{icon && <View style={[style.icon, iconStyle]}>{icon}</View>}
<AppText style={titleStyle}>{title}</AppText>
</MenuOption>
pramahaditamaputra commented
Hi @plambir93kek did you found any solution for this ? because i'm facing this the same issue right now
sodik82 commented
just curious, what everything is under your test?
because MenuOptions are rendered inside MenuProvider component normally
kkaplinski commented
I'm facing the same issue. Even when I manually set opened={true}
, there is no menu options in the snapshot. I render menu component inside Menu Provider
in my tests.