diff --git a/.github/workflows/e2e_android.yml b/.github/workflows/e2e_android.yml index db9cf3f62..829ec8a98 100644 --- a/.github/workflows/e2e_android.yml +++ b/.github/workflows/e2e_android.yml @@ -1,5 +1,6 @@ name: e2e-Android on: + workflow_dispatch: push: # Android builds require access to several secrets, so Github won't run # those jobs when triggered by pull requests by external developers. diff --git a/.github/workflows/e2e_ios.yml b/.github/workflows/e2e_ios.yml index 9b93d2bdb..a8960de5f 100644 --- a/.github/workflows/e2e_ios.yml +++ b/.github/workflows/e2e_ios.yml @@ -3,6 +3,7 @@ ## name: e2e-iOS on: + workflow_dispatch: push: branches: - 'main' diff --git a/e2e/addObservationWithoutData.e2e.js b/e2e/addObservationWithoutData.e2e.js index 202c3581b..1deab8d4b 100644 --- a/e2e/addObservationWithoutData.e2e.js +++ b/e2e/addObservationWithoutData.e2e.js @@ -29,20 +29,18 @@ describe( "Add observation without evidence", () => { it( "should open app with the observation list screen", async () => { const loginText = element( by.id( "log-in-to-iNaturalist-text" ) ); - await waitFor( loginText ).toBeVisible().withTimeout( 10000 ); - await expect( loginText ).toBeVisible(); + await waitFor( loginText ).toBeVisible( ).withTimeout( 10000 ); + await expect( loginText ).toBeVisible( ); } ); it( "should navigate to observation add screen on add evidence button pressed", async () => { - await waitFor( element( by.id( "add-obs-button" ) ) ) - .toBeVisible() - .withTimeout( 10000 ); - await element( by.id( "add-obs-button" ) ).tap(); - await expect( element( by.id( "evidence-text" ) ) ).toBeVisible(); - await expect( - element( by.id( "observe-without-evidence-button" ) ) - ).toBeVisible(); - await element( by.id( "observe-without-evidence-button" ) ).tap(); - await waitFor( element( by.id( "new-observation-text" ) ) ).toBeVisible().withTimeout( 10000 ); + 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 ); } ); } );