FormidableLabs / react-native-owl

Visual regression testing library for React Native that enables developers to introduce visual regression tests to their apps.
https://formidable.com/open-source/react-native-owl/
MIT License
635 stars 27 forks source link

[Android] Issue with Immersive mode image failing tests #129

Open WMichael opened 1 year ago

WMichael commented 1 year ago

Hello 👋

When running the visual regression tests for Android locally and on the pipeline the app loads into immersive mode and shows the following message. This is fine locally as I can just click on Got it and it won't show on any subsequent test runs but on the pipeline this isn't possible. immersivemode

We have found a way of dismissing this message locally by running this adb command before taking the screenshot exec('adb shell input text "mock\\ text"'); But when trying this on the pipeline, the latest screenshot shows the navigational buttons and top status bar as so. Screenshot 2022-11-01 at 09 48 00

Is there a more effective way of dismissing that Android message?

gksander commented 1 year ago

Hi @WMichael – thanks for reaching out! Are you at liberty to share some more details about what your CI pipeline setup looks like? We have some documentation on running Android in GitHub Actions – I'm curious how close your setup is to that outlined in the docs.

wcandillon commented 1 year ago

We're experiencing the same issue locally. Regarding CI, we're running into the same issues thart the one logged ar https://github.com/FormidableLabs/react-native-owl/pull/123

jwfwessels commented 3 months ago

This is standard behavior on Android devices the first time one runs an application in immersive mode.

I got around this by running the following after starting the emulator but before starting tests. Ideally, react-native-owl should handle this, but I have no idea where one would add the code.

adb shell settings put secure immersive_mode_confirmations confirmed