Skip to content

Commit b04cfbd

Browse files
committed
fix(conversion-flow): keep fee row spinner visible while the quote is loading
1 parent bce8d7a commit b04cfbd

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

__tests__/screens/conversion-flow/conversion-confirmation.spec.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { Text, TouchableOpacity } from "react-native"
2+
import { ActivityIndicator, Text, TouchableOpacity } from "react-native"
33
import { fireEvent, render, screen, waitFor } from "@testing-library/react-native"
44
import { useNavigation } from "@react-navigation/native"
55

@@ -304,4 +304,23 @@ describe("conversion-confirmation-screen", () => {
304304

305305
expect(screen.queryByText("$0.00")).toBeNull()
306306
})
307+
308+
it("renders the fee row with a spinner while the quote is loading", () => {
309+
mockConversionExecution.mockReturnValue({
310+
isQuoting: true,
311+
hasQuoteError: false,
312+
feeText: "",
313+
hasFee: false,
314+
canExecute: false,
315+
execute: jest.fn(),
316+
})
317+
318+
render(
319+
<ContextForScreen>
320+
<ConversionConfirmationScreen route={buildRoute(WalletCurrency.Btc, 10000)} />
321+
</ContextForScreen>,
322+
)
323+
324+
expect(screen.UNSAFE_getByType(ActivityIndicator)).toBeTruthy()
325+
})
307326
})

0 commit comments

Comments
 (0)