mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-05 06:05:12 -04:00
* Fix #2572 - New design for MyObservations - default mode, logged out, no observations * Fixed tests * Update close onboarding part of e2e tests * Update sign-in for e2e * Update loadTranslations.js --------- Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
22 lines
660 B
JavaScript
22 lines
660 B
JavaScript
import {
|
|
by,
|
|
element,
|
|
waitFor
|
|
} from "detox";
|
|
|
|
const VISIBILITY_TIMEOUT = 10_000;
|
|
|
|
export default async function closeOnboarding( ) {
|
|
const loginText = element( by.id( "use-iNaturalist-intro-text" ) );
|
|
await waitFor( loginText ).toExist().withTimeout( VISIBILITY_TIMEOUT );
|
|
// If we can see MyObs, we don't need to close the onboarding
|
|
if ( loginText.visible ) {
|
|
return Promise.resolve( );
|
|
}
|
|
const closeOnboardingButton = element(
|
|
by.label( "Close" ).withAncestor( by.id( "OnboardingCarousel" ) )
|
|
);
|
|
await waitFor( closeOnboardingButton ).toBeVisible( ).withTimeout( VISIBILITY_TIMEOUT );
|
|
return closeOnboardingButton.tap( );
|
|
}
|