mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
MOB-722 use a test taxon where the common name does not contain the scientific name
This commit is contained in:
@@ -7,10 +7,10 @@ import { renderComponent } from "tests/helpers/render";
|
|||||||
|
|
||||||
const mockTaxon = factory( "LocalTaxon", {
|
const mockTaxon = factory( "LocalTaxon", {
|
||||||
id: 47170,
|
id: 47170,
|
||||||
name: "Fungi",
|
name: "actinopterygii",
|
||||||
preferred_common_name: "Fungi Including Lichens",
|
preferred_common_name: "Ray-finned Fishes",
|
||||||
rank: "kingdom",
|
rank: "class",
|
||||||
rank_level: 70,
|
rank_level: 50,
|
||||||
default_photo: {
|
default_photo: {
|
||||||
url: "https://example.com/photo.jpg"
|
url: "https://example.com/photo.jpg"
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,8 @@ describe( "IconicSuggestion", () => {
|
|||||||
it( "renders taxon with common name and scientific name", () => {
|
it( "renders taxon with common name and scientific name", () => {
|
||||||
renderComponent( <IconicSuggestion taxon={mockTaxon} /> );
|
renderComponent( <IconicSuggestion taxon={mockTaxon} /> );
|
||||||
|
|
||||||
expect( screen.getByText( "Fungi Including Lichens" ) ).toBeTruthy();
|
expect( screen.getByText( "Ray-finned Fishes" ) ).toBeTruthy();
|
||||||
expect( screen.getByText( "Fungi" ) ).toBeTruthy();
|
expect( screen.getByText( "actinopterygii" ) ).toBeTruthy();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
it( "calls handlePress when pressed", () => {
|
it( "calls handlePress when pressed", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user