mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
fix tests
This commit is contained in:
@@ -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 );
|
||||
};
|
||||
|
||||
|
||||
@@ -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 );
|
||||
};
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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", ( ) => {
|
||||
|
||||
Reference in New Issue
Block a user