fix tests

This commit is contained in:
Abbey Campbell
2025-12-02 13:29:00 -08:00
parent 890cd76838
commit 2ee99d6c7b
4 changed files with 7 additions and 7 deletions

View File

@@ -244,7 +244,7 @@ describe( "Suggestions", ( ) => {
await actor.press( observationGridItem );
const editButton = await screen.findByLabelText( "Edit" );
await act( async ( ) => actor.press( editButton ) );
const addIdButton = await screen.findByText( "ID WITH AI" );
const addIdButton = await screen.findByText( "IDENTIFY" );
await actor.press( addIdButton );
};

View File

@@ -189,7 +189,7 @@ const navigateToSuggestionsForObservationViaObsEdit = async observation => {
`MyObservations.obsGridItem.${observation.uuid}`
);
await actor.press( observationGridItem );
const addIdButton = await screen.findByText( "ID WITH AI" );
const addIdButton = await screen.findByText( "IDENTIFY" );
await actor.press( addIdButton );
};

View File

@@ -134,7 +134,7 @@ describe( "Suggestions", ( ) => {
} else {
const addIdButton = observation.taxon
? await screen.findByLabelText( "Edit identification" )
: await screen.findByText( "ID WITH AI" );
: await screen.findByText( "IDENTIFY" );
await actor.press( addIdButton );
}
}

View File

@@ -40,14 +40,14 @@ const renderIdentificationSection = ( obs, index = 0, resetState = false ) => re
);
describe( "IdentificationSection", () => {
it( "should show ID WITH AI button when observation has photos", ( ) => {
it( "should show IDENTIFY button when observation has photos", ( ) => {
renderIdentificationSection( [observationWithPhotos] );
expect( screen.getByText( "ID WITH AI" ) ).toBeTruthy();
expect( screen.getByText( "IDENTIFY" ) ).toBeTruthy();
} );
it( "should not show ID WITH AI button when observation has no photos", ( ) => {
it( "should not show IDENTIFY button when observation has no photos", ( ) => {
renderIdentificationSection( [observationWithoutPhotos] );
expect( screen.queryByText( "ID WITH AI" ) ).toBeNull();
expect( screen.queryByText( "IDENTIFY" ) ).toBeNull();
} );
it( "should show correct iconic taxon selection when navigating multiple observations", ( ) => {