diff --git a/web-wallet/src/routes/(welcome)/setup/create/__tests__/page.spec.js b/web-wallet/src/routes/(welcome)/setup/create/__tests__/page.spec.js index 68e3e8719e..a402039ae2 100644 --- a/web-wallet/src/routes/(welcome)/setup/create/__tests__/page.spec.js +++ b/web-wallet/src/routes/(welcome)/setup/create/__tests__/page.spec.js @@ -12,11 +12,11 @@ import Create from "../+page.svelte"; import { settingsStore, walletStore } from "$lib/stores"; import { setKey } from "lamb"; import { Wallet } from "@dusk-network/dusk-wallet-js"; -import * as walletService from "$lib/services/wallet"; +import { getSeedFromMnemonic } from "$lib/wallet"; import * as appNavigation from "$app/navigation"; -import * as bip39 from "bip39"; // Import the bip39 library -import { encryptMnemonic, getSeedFromMnemonic } from "$lib/wallet"; -import * as shuffleArray from "$lib/dusk/array"; // Import the bip39 library +import * as bip39 from "bip39"; +import * as walletService from "$lib/services/wallet"; +import * as shuffleArray from "$lib/dusk/array"; import { tick } from "svelte"; import loginInfoStorage from "$lib/services/loginInfoStorage"; @@ -214,8 +214,9 @@ describe("Create", async () => { // Note: This type of test won't work for mnemonic with repeated words mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -244,8 +245,9 @@ describe("Create", async () => { mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -281,8 +283,9 @@ describe("Create", async () => { // Note: This type of test won't work for mnemonic with repeated words mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -312,8 +315,9 @@ describe("Create", async () => { // Note: This type of test won't work for mnemonic with repeated words mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -344,8 +348,9 @@ describe("Create", async () => { // Note: This type of test won't work for mnemonic with repeated words mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -379,8 +384,9 @@ describe("Create", async () => { mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick(); @@ -430,8 +436,9 @@ describe("Create", async () => { mnemonicSplit.forEach(async word => { const button = getByRole("button", { name: word }); + await fireEvent.click(button); - }) + }); await tick();