Files
iNaturalistReactNative/tests/unit/components/Suggestions/Attribution.test.js
Johannes Klein f10188250c Some Flow to Typescript migrations, in simple components (#3034)
* Update Attribution.tsx

* Update FollowButton.tsx

* Update LoginSheet.tsx

* Update UnfollowSheet.tsx

* Update UnfollowSheet.tsx

* Update EstablishmentMeans.tsx

* Update TaxonDetailsTitle.tsx

* Update Taxonomy.tsx

* Update TaxonMapPreview.tsx

* Update FullScreenActivityIndicator.tsx

* Update ActivityIndicator.tsx

* Update SpeciesSeenCheckmark.tsx

* Update Mortal.tsx

* Update HideView.tsx

* Update ConfidenceInterval.tsx

* Update ViewWrapper.tsx

* Update ScrollViewWrapper.tsx

* Update SimpleObservationLocation.tsx

* Update Divider.tsx

* Update DateTimePicker.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update DisplayTaxon.tsx

* Update InputField.tsx

* Update InputField.tsx

* Update ObservationLocation.tsx

* Update WarningText.tsx

* Update LoadingIndicator.tsx

* Update CrosshairCircle.tsx

* Update CoordinatesCopiedNotification.tsx

* Update PhotoSharing.tsx

* Update TaxonDetailsMediaViewerHeader.tsx

* Update EvidenceButton.tsx

* Update TextSheet.tsx

* Update Wikipedia.tsx

* Update About.tsx

* Update About.tsx

* Update imports

* Code style
2025-08-01 12:25:46 +02:00

24 lines
699 B
JavaScript

import { screen } from "@testing-library/react-native";
import Attribution from "components/Suggestions/Attribution.tsx";
import React from "react";
import faker from "tests/helpers/faker";
import { renderComponent } from "tests/helpers/render";
const mockObservers = [
faker.person.fullName( ), faker.person.fullName( ), faker.person.fullName( )
];
const renderAttribution = ( ) => renderComponent(
<Attribution
observers={mockObservers}
/>
);
describe( "Attribution", ( ) => {
it( "should show attributions", async ( ) => {
renderAttribution( );
const observerName = screen.getByText( new RegExp( mockObservers[0] ) );
expect( observerName ).toBeVisible( );
} );
} );