Skip to content

Commit

Permalink
test: [GSW-2040] Update Test Code
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrg committed Jan 9, 2025
1 parent 8655856 commit 8a93eb3
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { DEVICE_TYPE } from "@styles/media";
import { createMockRouter } from "@test/createMockRouter";

import NotificationButton from "./NotificationButton";
import SocialWalletProvider from "@providers/social-wallet-provider";

describe("NotificationButton Component", () => {
it("Notification button", () => {
Expand All @@ -31,9 +32,11 @@ describe("NotificationButton Component", () => {
<QueryClientProvider client={queryClient}>
<JotaiProvider>
<GnoswapServiceProvider>
<GnoswapThemeProvider>
<NotificationButton {...mockProps} />
</GnoswapThemeProvider>
<SocialWalletProvider>
<GnoswapThemeProvider>
<NotificationButton {...mockProps} />
</GnoswapThemeProvider>
</SocialWalletProvider>
</GnoswapServiceProvider>
</JotaiProvider>
</QueryClientProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { DEVICE_TYPE } from "@styles/media";
import { createMockRouter } from "@test/createMockRouter";

import AssetReceiveModal, { DEFAULT_DEPOSIT_GNOT } from "./AssetReceiveModal";
import SocialWalletProvider from "@providers/social-wallet-provider";

describe("AssetReceiveModal Component", () => {
it("AssetReceiveModal render", () => {
Expand Down Expand Up @@ -37,7 +38,9 @@ describe("AssetReceiveModal Component", () => {
<JotaiProvider>
<GnoswapThemeProvider>
<GnoswapServiceProvider>
<AssetReceiveModal {...mockProps} />
<SocialWalletProvider>
<AssetReceiveModal {...mockProps} />
</SocialWalletProvider>
</GnoswapServiceProvider>
</GnoswapThemeProvider>
</JotaiProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Provider as JotaiProvider } from "jotai";
import GnoswapThemeProvider from "@providers/gnoswap-theme-provider/GnoswapThemeProvider";
import WalletBalance from "./WalletBalance";
import { DEVICE_TYPE } from "@styles/media";
import { WalletType } from "src/types/wallet.types";

describe("WalletBalance Component", () => {
it("WalletBalance render", () => {
Expand All @@ -11,13 +12,26 @@ describe("WalletBalance Component", () => {
balanceSummaryInfo: {
amount: "$1,000.00",
changeRate: "+1.1%",
loading: false,
},
balanceDetailInfo: {
availableBalance: "1.10%",
stakedLP: "1.20%",
unstakedLP: "1.30%",
claimableRewards: "1.40%",
loadingBalance: false,
loadingPositions: false,
totalClaimedRewards: "0",
},
isSwitchNetwork: false,
loadngTransactionClaim: false,
positions: [],
tokenPrices: {},
walletType: {
type: "ADENA" as WalletType,
socialType: null,
},

deposit: () => null,
withdraw: () => null,
claimAll: () => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,38 @@ import { Provider as JotaiProvider } from "jotai";
import GnoswapThemeProvider from "@providers/gnoswap-theme-provider/GnoswapThemeProvider";
import WalletBalanceSummary from "./WalletBalanceSummary";
import { DEVICE_TYPE } from "@styles/media";
import { WalletType } from "src/types/wallet.types";

describe("WalletBalanceSummary Component", () => {
it("WalletBalanceSummary render", () => {
const mockProps = {
connected: true,
balanceSummaryInfo: {
amount: "1,000.00",
changeRate: "+1.10%",
amount: "$1,000.00",
changeRate: "+1.1%",
loading: false,
},
balanceDetailInfo: {
availableBalance: "1.10%",
stakedLP: "1.20%",
unstakedLP: "1.30%",
claimableRewards: "1.40%",
loadingBalance: false,
loadingPositions: false,
totalClaimedRewards: "0",
},
isSwitchNetwork: false,
loadngTransactionClaim: false,
positions: [],
tokenPrices: {},
walletType: {
type: "ADENA" as WalletType,
socialType: null,
},

deposit: () => null,
withdraw: () => null,
windowSize: 900,
claimAll: () => null,
breakpoint: DEVICE_TYPE.WEB,
};

Expand Down

0 comments on commit 8a93eb3

Please sign in to comment.