import { Alert } from "react-native"; import { render } from "@testing-library/react-native"; import { renderWithExperimentalEnabledContextProvider } from "../../../utils/testing"; import { ListItemAction } from "../ListItemAction"; import { ListItemInfo } from "../ListItemInfo"; import { ListItemInfoCopy } from "../ListItemInfoCopy"; import { ListItemNav } from "../ListItemNav"; import { ListItemNavAlert } from "../ListItemNavAlert"; import { ListItemRadioWithAmount } from "../ListItemRadioWithAmount"; import { ListItemTransaction } from "../ListItemTransaction"; import { PressableListItemBase } from "../PressableListItemBase"; const onButtonPress = () => { Alert.alert("Alert", "Action triggered"); }; describe("Test List Item Components", () => { it("ListItemInfo Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemInfoCopy Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemNav Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemNavAlert Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemAction Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemTransaction Snapshot", () => { const { toJSON } = render( ); expect(toJSON()).toMatchSnapshot(); }); it("PressableListItemsBase Snapshot", () => { const { toJSON } = render(); expect(toJSON()).toMatchSnapshot(); }); it("ListItemRadioWithAmount Snapshot", () => { const { toJSON: toJSONSuggested } = render( ); const { toJSON: toJSONNotSuggested } = render( ); expect(toJSONSuggested()).toMatchSnapshot(); expect(toJSONNotSuggested()).toMatchSnapshot(); }); }); describe("Test List Item Components - Experimental Enabled ", () => { it("ListItemInfo Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemInfoCopy Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemNav Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemNavAlert Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemAction Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemTransaction Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("PressableListItemsBase Snapshot", () => { const { toJSON } = renderWithExperimentalEnabledContextProvider( ); expect(toJSON()).toMatchSnapshot(); }); it("ListItemRadioWithAmount Snapshot", () => { const { toJSON: toJSONSuggested } = renderWithExperimentalEnabledContextProvider( ); const { toJSON: toJSONNotSuggested } = renderWithExperimentalEnabledContextProvider( ); expect(toJSONSuggested()).toMatchSnapshot(); expect(toJSONNotSuggested()).toMatchSnapshot(); }); });