-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional account import feature
- Loading branch information
1 parent
d1a4a0a
commit 48bef7d
Showing
24 changed files
with
290 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./AccountTile"; | ||
export * from "./AccountTileWrapper"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
apps/web/src/components/Onboarding/ImportWallet/ImportWallet.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { mockImplicitAccount } from "@umami/core"; | ||
import { addTestAccount, makeStore } from "@umami/state"; | ||
|
||
import { ImportWallet } from "./ImportWallet"; | ||
import { renderInModal, screen, waitFor } from "../../../testUtils"; | ||
|
||
jest.mock("@chakra-ui/react", () => ({ | ||
...jest.requireActual("@chakra-ui/react"), | ||
useBreakpointValue: jest.fn(map => map["lg"]), | ||
})); | ||
|
||
describe("<ImportWallet />", () => { | ||
it.each(["Seed Phrase", "Secret Key", "Ledger"])("renders %s tab", async tabName => { | ||
await renderInModal(<ImportWallet />); | ||
|
||
await waitFor(() => expect(screen.getByText(tabName)).toBeVisible()); | ||
}); | ||
|
||
describe("when the user has not onboarded", () => { | ||
it("renders the Backup tab", async () => { | ||
await renderInModal(<ImportWallet />); | ||
|
||
await waitFor(() => expect(screen.getByText("Backup")).toBeVisible()); | ||
}); | ||
}); | ||
|
||
describe("when the user has onboarded", () => { | ||
it("does not render the Backup tab", async () => { | ||
const store = makeStore(); | ||
addTestAccount(store, mockImplicitAccount(0)); | ||
|
||
await renderInModal(<ImportWallet />, store); | ||
|
||
expect(screen.queryByText("Backup")).not.toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
48bef7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.