Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shahin-hq committed Nov 15, 2024
1 parent eab50a1 commit 3594260
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,33 @@ describe("Transactions", () => {
);
});

it("should disable type filter when there are no transactions", async () => {
const emptyProfile = await env.profiles().create("test9");

const wallet = await emptyProfile.walletFactory().fromMnemonicWithBIP39({
coin: "ARK",
mnemonic: MNEMONICS[2],
network: "ark.devnet",
});

emptyProfile.wallets().push(wallet);

render(
<Route path="/profiles/:profileId/dashboard">
<Transactions profile={emptyProfile} wallets={[wallet]} />
</Route>,
{
history,
route: dashboardURL,
},
);

await expect(screen.findByTestId("EmptyBlock")).resolves.toBeVisible();

const button = screen.getAllByRole("button", { name: /Type/ })[0];
expect(button).toBeDisabled();
});

it("should filter by type and see empty screen", async () => {
render(
<Route path="/profiles/:profileId/dashboard">
Expand Down

0 comments on commit 3594260

Please sign in to comment.