-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
Description
As discovered in issue #156 , adding the floatingLabel prop to a Native Base form <Item> makes the enclosed <Input> field undiscoverable by Cavy.
How to replicate
The component:
import { Form, Item, Label, Input } from 'native-base';
import { hook } from 'cavy';
class AuthScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
someValue: '',
};
}
render() {
return (
<Form>
<Item floatingLabel>
<Label>Some Input</Label>
<Input
ref={this.props.generateTestHook('NativeBaseTextInput')}
onChangeText={(someValue) => this.setState({ someValue })}
/>
</Item>
</Form>
);
}
}
export default hook(AuthScreen);
The failing test:
export default function(spec) {
spec.describe('Logging in', function() {
spec.it('works', async function() {
await spec.findComponent('NativeBaseTextInput');
// findComponent times out
}
}
}
See comment posted by @PoetiCode for a starter: #156 (comment)