Skip to content

Select an image from a expo-image-picker with Detox #4744

Open
@BhavyaCodeAlchemy

Description

@BhavyaCodeAlchemy

Did you test using the latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test fail and you're not sure why?

  • I have read the troubleshooting guide and it didn't help me.

What happened?

I encountered an issue while implementing a Detox test case for selecting an image from the gallery using ImagePicker.launchImageLibraryAsync() in the Expo app.

I attempted to use the following code to interact with the gallery:

await element(by.type('UIImageView')).atIndex(0).tap();

Although this successfully taps into the image, it does not confirm the image selection, and the selected image is not displayed in the app as expected.

Actual Behavior

  • The test taps on the image but does not register the image selection.

Additional Context

  • The app is built with Expo and React Native.
  • Detox is being used for end-to-end testing.

What was the expected behaviour?

Expected Behavior

  • The Detox test should be able to simulate selecting an image from the gallery.
  • The selected image should appear in the app's UI.

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
iOS version:
macOS version:
Xcode version:
Test-runner (select one): jest / other

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions