1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/ui/pages/desktop-error/__snapshots__/desktop-error.test.js.snap
João Tavares bde74756d3
Add extension desktop UI (#17748)
* feat: add desktop enable button component

This component will be added
to the experimental page. Users
will then be able to initialize
a desktop connection

* feat: add desktop pairing page

* feat: add desktop deep-linking shared lib

* test: add initial entries to render helper

Allow specifying initialEntries for
MemoryRouter. This change will allow
testing pages that use the useParam
hook.

* feat: add desktop error page

Error page for any desktop pairing
related issue

* feat: add desktop routes to route component

* feat: add enable desktop button to experimental tab

* feat: add desktop icon when paired in dev mode

* feat: disable ledger live control when desktop enabled

* feat: register desktop error actions on ui init

* fix: add missing code fencing

* chore: remove enable desktop rpc middleware

Now that we are adding the UI
there's no need for this rpc middleware
(as it was used to test desktop background
code)

* fix: display experimental tab for desktop
2023-02-23 16:39:48 +00:00

374 lines
14 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Desktop Error page should render connection lost page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MetaMask Desktop connection was lost
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
Please make sure you have the desktop app up and running or disable MetaMask Desktop.
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-open-or-download-mmd"
role="button"
tabindex="0"
>
Open MetaMask Desktop
</button>
</div>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-disable-mmd"
role="button"
tabindex="0"
>
Disable MetaMask Desktop
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render critical error page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MetaMask had trouble starting
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
This error could be intermittent, so try restarting the extension or disable MetaMask Desktop.
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-restart-mm"
role="button"
tabindex="0"
>
Restart MetaMask
</button>
</div>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-disable-mmd"
role="button"
tabindex="0"
>
Disable MetaMask Desktop
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render default error page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
Something went wrong...
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
Check your MetaMask Desktop to restore connection
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-return-mm-home"
role="button"
tabindex="0"
>
Return MetaMask Home
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render desktop app outdated page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MetaMask Desktop is outdated
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
Your MetaMask desktop app needs to be upgraded.
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-update-mmd"
role="button"
tabindex="0"
>
Update MetaMask Desktop
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render extension outdated page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MetaMask Extension is outdated
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
Your MetaMask extension needs to be upgraded.
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-update-extension"
role="button"
tabindex="0"
>
Update MetaMask Extension
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render not found page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MetaMask Desktop was not found
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
Please make sure you have the desktop app up and running.
</p>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
If you have no desktop app installed, please download it on the MetaMask website.
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-download-mmd"
role="button"
tabindex="0"
>
Download MetaMask Desktop
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render pairing key not match page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
MM Desktop is already paired
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
If you want to start a new pairing, please remove the current connection.
</p>
<a
class="button btn-link desktop-pairing-warning__link"
role="button"
tabindex="0"
>
Go to Settings in MetaMask Desktop
</a>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-navigate-settings"
role="button"
tabindex="0"
>
Return to Settings Page
</button>
</div>
</div>
</div>
`;
exports[`Desktop Error page should render route not found page 1`] = `
<div>
<div
class="box box--margin-top-6 box--margin-right-6 box--margin-left-6 box--display-flex box--flex-direction-column box--align-items-center box--text-align-center"
>
<svg
fill="var(--color-error-default"
height="64"
viewBox="0 0 352 512"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
<h4
class="box box--margin-top-6 box--margin-bottom-6 box--flex-direction-row typography typography--h4 typography--weight-bold typography--style-normal typography--color-text-default"
>
desktopRouteNotFoundErrorTitle
</h4>
<p
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography typography--p typography--weight-normal typography--style-normal typography--color-text-default"
>
desktopRouteNotFoundErrorDescription
</p>
<div
class="box box--margin-top-6 box--flex-direction-row"
>
<button
class="button btn--rounded btn-primary"
id="desktop-error-button-navigate-settings"
role="button"
tabindex="0"
>
Return to Settings Page
</button>
</div>
</div>
</div>
`;