Files
iNaturalistReactNative/e2e/helpers.js
Ken-ichi b7bf5fd950 Minor changes to e2e testing (#814)
* Removed sign in test since the obs creation test already signs in
* Renamed two remaining test files to signedIn and signedOut to reflect the
  different conditions that they test
* Add a check to wait for comments count component after uploading an observation

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-10-05 10:18:39 -07:00

22 lines
657 B
JavaScript

export async function iNatE2eBeforeAll( device ) {
if ( device.getPlatform() === "android" ) {
await device.launchApp( {
newInstance: true,
permissions: { location: "always" }
} );
}
}
export async function iNatE2eBeforeEach( device ) {
// device.launchApp would be preferred for an app of our complexity. It does work locally
// for both, but on CI for Android it does not work. So we use reloadReactNative for Android.
if ( device.getPlatform() === "android" ) {
await device.reloadReactNative();
} else {
await device.launchApp( {
newInstance: true,
permissions: { location: "always" }
} );
}
}