From d91c50d29de77b9e306dea3aaa924b0e59e742bb Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Thu, 11 Jun 2026 23:38:37 +0200 Subject: [PATCH] Move the Save button press --- tests/helpers/addObsBottomSheet.js | 4 ++++ tests/integration/navigation/MyObservations.test.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/helpers/addObsBottomSheet.js b/tests/helpers/addObsBottomSheet.js index 03312a61b..880f0fa74 100644 --- a/tests/helpers/addObsBottomSheet.js +++ b/tests/helpers/addObsBottomSheet.js @@ -141,6 +141,10 @@ export async function navigateToSuggestionsViaAICameraFromMyObs() { await navigateToAICameraFromMyObs( ); await takeAICameraPhotoAndOpenSuggestions( ); } +async function pressObsEditSaveButton() { + await actor.press( await screen.findByTestId( "ObsEdit.saveButton" ) ); +} /** Saves on ObsEdit, confirming warning sheets when they appear, then waits for My Obs. */ export async function saveObsEditObservation( options = {} ) { + await pressObsEditSaveButton(); } diff --git a/tests/integration/navigation/MyObservations.test.js b/tests/integration/navigation/MyObservations.test.js index 97d00d261..9fd32e473 100644 --- a/tests/integration/navigation/MyObservations.test.js +++ b/tests/integration/navigation/MyObservations.test.js @@ -176,7 +176,6 @@ describe( "MyObservations -> ObsEdit no evidence -> MyObservations", ( ) => { await waitForDisplayedText( /1 observation uploaded/ ); await pressButtonByLabel( /Add observations/ ); await pressButtonByLabel( /Observation with no evidence/ ); - await pressButtonByText( /SAVE/ ); // missing evidence sheet pops up here, so need to press SAVE twice await pressButtonByText( "OK" ); await pressButtonByText( /SAVE/ );