mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-18 13:58:44 -04:00
21 lines
805 B
JavaScript
21 lines
805 B
JavaScript
import { screen } from "@testing-library/react-native";
|
|
import PreMatchLoadingScreen from "components/Match/PreMatchLoadingScreen";
|
|
import React from "react";
|
|
import { renderComponent } from "tests/helpers/render";
|
|
|
|
describe( "PreMatchLoadingScreen", () => {
|
|
it( "renders nothing when isLoading is false", () => {
|
|
renderComponent( <PreMatchLoadingScreen isLoading={false} /> );
|
|
|
|
expect( screen.queryByText( "Analyzing for the best identification..." ) ).toBeFalsy();
|
|
} );
|
|
|
|
it( "shows loading screen when isLoading is true", () => {
|
|
renderComponent( <PreMatchLoadingScreen isLoading /> );
|
|
|
|
expect( screen.getByText( "Analyzing for the best identification..." ) ).toBeVisible();
|
|
// Find activity indicator
|
|
expect( screen.getByRole( "progressbar" ) ).toBeVisible();
|
|
} );
|
|
} );
|