mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-19 14:28:02 -04:00
* 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>
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
import {
|
|
by,
|
|
device,
|
|
element,
|
|
expect,
|
|
waitFor
|
|
} from "detox";
|
|
|
|
import { iNatE2eBeforeAll, iNatE2eBeforeEach } from "./helpers";
|
|
|
|
describe( "Signed out user", () => {
|
|
beforeAll( async ( ) => iNatE2eBeforeAll( device ) );
|
|
beforeEach( async ( ) => iNatE2eBeforeEach( device ) );
|
|
|
|
it( "should start at My Observations with log in text", async () => {
|
|
const loginText = element( by.id( "log-in-to-iNaturalist-button.text" ) );
|
|
await waitFor( loginText ).toBeVisible( ).withTimeout( 10000 );
|
|
await expect( loginText ).toBeVisible( );
|
|
} );
|
|
|
|
it( "should add an observation without evidence", async () => {
|
|
const addObsButton = element( by.id( "add-obs-button" ) );
|
|
await waitFor( addObsButton ).toBeVisible( ).withTimeout( 10000 );
|
|
await addObsButton.tap( );
|
|
await expect( element( by.id( "evidence-text" ) ) ).toBeVisible( );
|
|
const obsWithoutEvidenceButton = element( by.id( "observe-without-evidence-button" ) );
|
|
await expect( obsWithoutEvidenceButton ).toBeVisible( );
|
|
await obsWithoutEvidenceButton.tap( );
|
|
await waitFor( element( by.id( "new-observation-text" ) ) ).toBeVisible( ).withTimeout( 10000 );
|
|
} );
|
|
} );
|