diff --git a/web-wallet/src/lib/components/Stake/Stake.svelte b/web-wallet/src/lib/components/Stake/Stake.svelte index e91340fa45..e19671404b 100644 --- a/web-wallet/src/lib/components/Stake/Stake.svelte +++ b/web-wallet/src/lib/components/Stake/Stake.svelte @@ -17,7 +17,6 @@ Agreement, Badge, Button, - Card, Icon, Textbox, Wizard, @@ -34,6 +33,7 @@ } from "$lib/components"; import StakeOverview from "./StakeOverview.svelte"; + import IconHeaderToggleCard from "$lib/containers/IconHeaderToggleCard/IconHeaderToggleCard.svelte"; /** @type {(...args: any[]) => Promise} */ export let execute; @@ -171,11 +171,11 @@ }} > - -
- -

Only stake if you have a node set up!

-
+

I understand that I have set up a node properly, as described - + {/if} @@ -359,12 +359,6 @@ } } - .card__header { - display: flex; - gap: var(--small-gap); - align-items: center; - } - .staking-warning { margin-bottom: 1em; } diff --git a/web-wallet/src/lib/components/__tests__/__snapshots__/Stake.spec.js.snap b/web-wallet/src/lib/components/__tests__/__snapshots__/Stake.spec.js.snap index 7069797a82..74fe64239c 100644 --- a/web-wallet/src/lib/components/__tests__/__snapshots__/Stake.spec.js.snap +++ b/web-wallet/src/lib/components/__tests__/__snapshots__/Stake.spec.js.snap @@ -305,26 +305,31 @@ exports[`Stake > should render the Stake notice 1`] = ` class="dusk-card dusk-card--gap-default dusk-card--on-surface" >

- - - - - + + + + + + +

+ Only stake if you have a node set up! +

+
-

- Only stake if you have a node set up! -

should render the Stake notice 1`] = ` + +

- + {#if iconPath} + + {/if}

{heading}

{#if isToggled !== undefined} diff --git a/web-wallet/src/lib/containers/__tests__/IconHeaderToggleCard.spec.js b/web-wallet/src/lib/containers/__tests__/IconHeaderToggleCard.spec.js index 133ea300e9..421c494bba 100644 --- a/web-wallet/src/lib/containers/__tests__/IconHeaderToggleCard.spec.js +++ b/web-wallet/src/lib/containers/__tests__/IconHeaderToggleCard.spec.js @@ -5,14 +5,22 @@ import { IconHeaderToggleCard } from ".."; describe("IconHeaderToggleCard", () => { afterEach(cleanup); - const props = { - heading: "My Card", - iconPath: "M3,3H21V21H3V3M5,5V19H19V5H5Z", - }; + it("renders the IconHeaderToggleCard component with a heading", () => { + const { container } = render(IconHeaderToggleCard, { + props: { + heading: "My Card", + }, + }); + + expect(container.firstChild).toMatchSnapshot(); + }); - it("renders the IconHeaderToggleCard component", () => { + it("renders the IconHeaderToggleCard component with a heading and an icon", () => { const { container } = render(IconHeaderToggleCard, { - props, + props: { + heading: "My Card", + iconPath: "M3,3H21V21H3V3M5,5V19H19V5H5Z", + }, }); expect(container.firstChild).toMatchSnapshot(); @@ -20,7 +28,11 @@ describe("IconHeaderToggleCard", () => { it("renders the IconHeaderToggleCard component with a toggle", () => { const { container } = render(IconHeaderToggleCard, { - props: { ...props, isToggled: true }, + props: { + heading: "My Card", + iconPath: "M3,3H21V21H3V3M5,5V19H19V5H5Z", + isToggled: true, + }, }); expect(container.firstChild).toMatchSnapshot(); diff --git a/web-wallet/src/lib/containers/__tests__/__snapshots__/IconHeaderToggleCard.spec.js.snap b/web-wallet/src/lib/containers/__tests__/__snapshots__/IconHeaderToggleCard.spec.js.snap index 77c9fbd238..c68b38fac1 100644 --- a/web-wallet/src/lib/containers/__tests__/__snapshots__/IconHeaderToggleCard.spec.js.snap +++ b/web-wallet/src/lib/containers/__tests__/__snapshots__/IconHeaderToggleCard.spec.js.snap @@ -1,6 +1,37 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`IconHeaderToggleCard > renders the IconHeaderToggleCard component 1`] = ` +exports[`IconHeaderToggleCard > renders the IconHeaderToggleCard component with a heading 1`] = ` +
+
+
+
+ +

+ My Card +

+
+ +
+ + + +
+ + + +
+`; + +exports[`IconHeaderToggleCard > renders the IconHeaderToggleCard component with a heading and an icon 1`] = `
import { settingsStore } from "$lib/stores"; import { AppImage } from "$lib/components"; - import { Card } from "$lib/dusk/components"; + import { IconHeaderToggleCard } from "$lib/containers"; const { darkMode } = $settingsStore; @@ -10,8 +10,7 @@ "/images/onboarding/all_set_illustration_light.svg"; - -

You are all set!

+ -
+ diff --git a/web-wallet/src/routes/(welcome)/setup/create/__tests__/__snapshots__/page.spec.js.snap b/web-wallet/src/routes/(welcome)/setup/create/__tests__/__snapshots__/page.spec.js.snap index cd18be39dd..bc7540d952 100644 --- a/web-wallet/src/routes/(welcome)/setup/create/__tests__/__snapshots__/page.spec.js.snap +++ b/web-wallet/src/routes/(welcome)/setup/create/__tests__/__snapshots__/page.spec.js.snap @@ -337,17 +337,27 @@ exports[`Create > correctly renders the Mnemonic Verification page 1`] = `
-

- Verification -

+
+ +

+ Verification +

+
+ +

Ensure you have backed up the Mnemonic phrase.

@@ -617,10 +627,12 @@ exports[`Create > correctly renders the Mnemonic Verification page 1`] = ` +
+
doesn't let the user proceed if they have entered mismatching
-

- Verification -

+
+ +

+ Verification +

+
+ +

Ensure you have backed up the Mnemonic phrase.

@@ -1065,7 +1087,7 @@ exports[`Create > doesn't let the user proceed if they have entered mismatching
doesn't let the user proceed if they have entered mismatching -

+

Mnemonic does not match.

+
+
ensures that the Undo button on the Mnemonic Validate step wor
-

- Verification -

+
+ +

+ Verification +

+
+ +

Ensure you have backed up the Mnemonic phrase.

@@ -1531,10 +1567,12 @@ exports[`Create > ensures that the Undo button on the Mnemonic Validate step wor +
+
ensures the All Done step renders as expected 1`] = `
-

- You are all set! -

+
+ +

+ You are all set! +

+
+ +
All Set ensures the All Done step renders as expected 1`] = ` width="205" /> +
+
lets the user proceed if they have entered a matching Mnemonic
-

- Verification -

+
+ +

+ Verification +

+
+ +

Ensure you have backed up the Mnemonic phrase.

@@ -2785,10 +2845,12 @@ exports[`Create > lets the user proceed if they have entered a matching Mnemonic +
+
should render the \`Securely store your seed phrase!\` agreeme
-

- Securely store your seed phrase! -

-
- - - + Securely store your seed phrase! +
- -
+ +
+ + + +
+ + +
+ + + + -
- +
+ +
+
should render the Terms of Service step of the Create flow if
-

- Terms & Privacy Policy -

+
+ +

+ Terms & Privacy Policy +

+
+ +

should render the Terms of Service step of the Create flow if

+
+
diff --git a/web-wallet/src/routes/(welcome)/setup/restore/MnemonicAuthenticate.svelte b/web-wallet/src/routes/(welcome)/setup/restore/MnemonicAuthenticate.svelte index c598dd671e..7ec47dda19 100644 --- a/web-wallet/src/routes/(welcome)/setup/restore/MnemonicAuthenticate.svelte +++ b/web-wallet/src/routes/(welcome)/setup/restore/MnemonicAuthenticate.svelte @@ -1,9 +1,12 @@ - -

Enter your Mnemonic Phrase

+ -
+ diff --git a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap index 5ac1adbc96..5a6f6ec4e8 100644 --- a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap +++ b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap @@ -152,12 +152,22 @@ exports[`Restore > should render the Mnemonic Authenticate step after accepting
-

- Enter your Mnemonic Phrase -

+
+ +

+ Enter your Mnemonic Phrase +

+
+ +
should render the Mnemonic Authenticate step after accepting
+
+
should render the Terms of Service step of the Restore flow i
-

- Terms & Privacy Policy -

+
+ +

+ Terms & Privacy Policy +

+
+ +

should render the Terms of Service step of the Restore flow i

+
+