diff --git a/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/portfolioAssets.integration.test.tsx b/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/portfolioAssets.integration.test.tsx index 6d32358a4668..d2e1d7895e2d 100644 --- a/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/portfolioAssets.integration.test.tsx +++ b/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/portfolioAssets.integration.test.tsx @@ -6,10 +6,13 @@ import TestNavigator, { INITIAL_STATE, SlicedMockedAccounts } from "./shared"; import { track } from "~/analytics"; describe("portfolioAssets", () => { + beforeAll(() => { + jest.useFakeTimers(); + }); it("should render empty portfolio", async () => { render( - console.log("modal")} /> + null} /> , { overrideInitialState: (state: State) => ({ @@ -26,7 +29,7 @@ describe("portfolioAssets", () => { it("should render portfolio with assets and accounts list", async () => { const { user } = render( - console.log("modal")} /> + null} /> , { ...INITIAL_STATE }, ); @@ -41,15 +44,17 @@ describe("portfolioAssets", () => { jest.advanceTimersByTime(600); + //screen.debug(); + expect(screen.getByText(/see all accounts/i)).toBeVisible(); expect(screen.getByText(/add new or existing account/i)).toBeVisible(); - // await waitFor(() => expect(screen.getByText(/cronos 2/i)).toBeVisible()); + // await waitFor(() => expect(screen.getByText(/cronos 2/i)).toBeVisible()); }); it("should hide see all button and display add account button because there is less than 5 assets", async () => { const { user } = render( - console.log("modal")} /> + null} /> , { overrideInitialState: (state: State) => ({ @@ -87,7 +92,7 @@ describe("portfolioAssets", () => { it("should render assets list screen", async () => { const { user } = render( - console.log("modal")} /> + null} /> , { ...INITIAL_STATE }, ); @@ -107,7 +112,7 @@ describe("portfolioAssets", () => { it("should render accounts list screen", async () => { const { user } = render( - console.log("modal")} /> + null} /> , { ...INITIAL_STATE }, ); diff --git a/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/shared.tsx b/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/shared.tsx index 603ed5f78f4f..3b18b744664e 100644 --- a/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/shared.tsx +++ b/apps/ledger-live-mobile/src/screens/Portfolio/__integrations__/shared.tsx @@ -1,46 +1,30 @@ import React from "react"; -import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator } from "@react-navigation/stack"; import { QueryClientProvider, QueryClient } from "@tanstack/react-query"; import { NavigatorName, ScreenName } from "~/const"; -import AssetsListNavigator from "LLM/features/Assets/Navigator"; -import { BaseNavigatorStackParamList } from "~/components/RootNavigator/types/BaseNavigator"; import { MockedAccounts } from "./mockedAccount"; -import AccountsListView from "LLM/features/Accounts/components/AccountsListView"; import { State } from "~/reducers/types"; +import AccountsNavigator from "LLM/features/Accounts/Navigator"; +import { BaseNavigatorStackParamList } from "~/components/RootNavigator/types/BaseNavigator"; +import AssetsList from "LLM/features/Assets/screens/AssetsList"; const Stack = createStackNavigator(); -const AccountStack = createStackNavigator(); - -const AccountNavigator = () => ( - - - -); const TestNavigator = ({ children }: { children: React.ReactNode }) => ( - - - - {() => children} - - - - - + + {() => children} + + + );