A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
I have used this component and trying to write test case using testing-library. Am getting the error "Unable to find an element with testID: text". I verified the comments and tried to implement by using the given comment.
I tried different ways. Can anyone help me out of this. Below is my code.
it('should select a different option', async () => {
const pickerData = [
{ label: 'ORANGE', value: 'ORANGE' },
{ label: 'APPLE', value: 'APPLE' },
{ label: 'WATERMELON', value: 'WATERMELON' },
{ label: 'PINAPLE', value: 'PINAPLE' }
// Add more options here if needed
];
I have used this component and trying to write test case using testing-library. Am getting the error "Unable to find an element with testID: text". I verified the comments and tried to implement by using the given comment.
I tried different ways. Can anyone help me out of this. Below is my code.
it('should select a different option', async () => { const pickerData = [ { label: 'ORANGE', value: 'ORANGE' }, { label: 'APPLE', value: 'APPLE' }, { label: 'WATERMELON', value: 'WATERMELON' }, { label: 'PINAPLE', value: 'PINAPLE' } // Add more options here if needed ];
render( <Select items={pickerData} open={true} setOpen={() => (true)} value={selectedOption} setValue={(val: any) => {}} disabled={false} testID={'PINAPLE'} /> );