import { render, screen } from "@testing-library/react-native";
import { UserIcon } from "components/SharedComponents";
import React from "react";
const mockUri = { uri: "some_uri" };
describe( "UserIcon", () => {
it( "should not have accessibility erros", () => {
const userIcon = ;
expect( userIcon ).toBeAccessible();
} );
it( "displays user image correctly", () => {
render( );
// Snapshot test
expect( screen ).toMatchSnapshot();
} );
it( "displays small user image correctly", () => {
render( );
// Snapshot test
expect( screen ).toMatchSnapshot();
} );
it( "displays active user image correctly", () => {
render( );
// Snapshot test
expect( screen ).toMatchSnapshot();
} );
it( "shows correct uri for the user icon image", () => {
render( );
// TODO: replace with getByRole
const profilePicture = screen.getByTestId( "UserIcon.photo" );
expect( profilePicture ).toBeTruthy();
expect( profilePicture.props.source ).toEqual( mockUri );
} );
} );