mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-02-02 18:11:27 -05:00
* 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
24 lines
699 B
JavaScript
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( );
|
|
} );
|
|
} );
|