forked from LedgerHQ/ledger-live
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support/add more discover tests (LedgerHQ#611)
* ci: use a free port for the dummy app server and use env to mock the manifest * removed redundant comment * moved dummy app to test folder * fixed eslint issue with dummy app * added step to test desktop composite * added more steps to discover tests * forced click of sign continue button * fixed shell line in gh action * fixed pnpm filter * fixed sign tx function * removed dummy live app * moved dummy app to test folder * fixed eslint issue with dummy app * added step to test desktop composite * added more steps to discover tests * forced click of sign continue button * fixed shell line in gh action * fixed pnpm filter * fixed sign tx function * removed dummy live app * chore: regen lockfile * ci: cleanup shared git folder before checkout * adding dummy live app back in * Revert "ci: cleanup shared git folder before checkout" This reverts commit 1a366a6. * removed screenshots and finished test flow * updated pnpm lock * updated pnpm.lock * added cross env * update screenshots (ubuntu-latest) * update screenshots (windows-latest) * added build step to the generate screenshots * update screenshots (ubuntu-latest) * update screenshots (windows-latest) * update screenshots (macos-latest) * reverted to develop screenshots * added wait for loader * update screenshots (ubuntu-latest) * update screenshots (windows-latest) * trigger ci * updated pnpm.lock * updated pnpm.lock to develop * updated pnpm.lock * fixed typo in discover test * update screenshots (ubuntu-latest) * update screenshots (macos-latest) * update screenshots (windows-latest) * removing old screenshots * regenerated lock file * removed unnecessary screenshots from PR * trigger ci * looking for first bitcoin 1 legacy * trigger ci to see if tests are still stable * removing addDependencies for postcss to see if it still works * added some details to the readme * Adding postcss-loader step back in Co-authored-by: elbywan <[email protected]> Co-authored-by: Team Live <[email protected]>
- Loading branch information
1 parent
5728643
commit 10226d3
Showing
74 changed files
with
4,318 additions
and
479 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
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
Binary file modified
BIN
-3.21 KB
(98%)
...specs/services/discover.spec.ts-snapshots/live-app-list-all-accounts-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.85 KB
(97%)
.../specs/services/discover.spec.ts-snapshots/live-app-list-all-accounts-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+491 Bytes
(100%)
.../specs/services/discover.spec.ts-snapshots/live-app-list-all-accounts-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+101 KB
...s/specs/services/discover.spec.ts-snapshots/live-app-list-currencies-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.9 KB
...ts/specs/services/discover.spec.ts-snapshots/live-app-list-currencies-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.8 KB
...ts/specs/services/discover.spec.ts-snapshots/live-app-list-currencies-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+123 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-drawer-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
...s/services/discover.spec.ts-snapshots/live-app-request-account-drawer-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+86.7 KB
...s/services/discover.spec.ts-snapshots/live-app-request-account-drawer-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-125 KB
...services/discover.spec.ts-snapshots/live-app-request-account-modal-1-darwin.png
Binary file not shown.
Binary file removed
BIN
-113 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-1-linux.png
Binary file not shown.
Binary file removed
BIN
-84.7 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-1-win32.png
Binary file not shown.
Binary file removed
BIN
-114 KB
...services/discover.spec.ts-snapshots/live-app-request-account-modal-2-darwin.png
Binary file not shown.
Binary file removed
BIN
-103 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-2-linux.png
Binary file not shown.
Binary file removed
BIN
-77.7 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-2-win32.png
Binary file not shown.
Binary file removed
BIN
-104 KB
...services/discover.spec.ts-snapshots/live-app-request-account-modal-3-darwin.png
Binary file not shown.
Binary file removed
BIN
-90.4 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-3-linux.png
Binary file not shown.
Binary file removed
BIN
-74.6 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-modal-3-win32.png
Binary file not shown.
Binary file added
BIN
+100 KB
.../services/discover.spec.ts-snapshots/live-app-request-account-output-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+92 KB
...s/services/discover.spec.ts-snapshots/live-app-request-account-output-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71.5 KB
...s/services/discover.spec.ts-snapshots/live-app-request-account-output-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+112 KB
...s/discover.spec.ts-snapshots/live-app-request-account-select-account-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.6 KB
...es/discover.spec.ts-snapshots/live-app-request-account-select-account-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+79.9 KB
...es/discover.spec.ts-snapshots/live-app-request-account-select-account-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.29 KB
(97%)
...es/discover.spec.ts-snapshots/live-app-request-single-account-output-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.56 KB
(100%)
...ces/discover.spec.ts-snapshots/live-app-request-single-account-output-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.08 KB
(96%)
...ces/discover.spec.ts-snapshots/live-app-request-single-account-output-win32.png
Oops, something went wrong.
Binary file added
BIN
+71.5 KB
...ervices/discover.spec.ts-snapshots/live-app-sign-transaction-confirm-darwin.png
Oops, something went wrong.
Binary file added
BIN
+65.2 KB
...services/discover.spec.ts-snapshots/live-app-sign-transaction-confirm-linux.png
Oops, something went wrong.
Binary file added
BIN
+67.3 KB
...services/discover.spec.ts-snapshots/live-app-sign-transaction-confirm-win32.png
Oops, something went wrong.
Binary file added
BIN
+82.3 KB
...s/services/discover.spec.ts-snapshots/live-app-sign-transaction-info-darwin.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...cs/services/discover.spec.ts-snapshots/live-app-sign-transaction-info-linux.png
Oops, something went wrong.
Binary file added
BIN
+70.9 KB
...cs/services/discover.spec.ts-snapshots/live-app-sign-transaction-info-win32.png
Oops, something went wrong.
Binary file added
BIN
+121 KB
...services/discover.spec.ts-snapshots/live-app-sign-transaction-output-darwin.png
Oops, something went wrong.
Binary file added
BIN
+110 KB
.../services/discover.spec.ts-snapshots/live-app-sign-transaction-output-linux.png
Oops, something went wrong.
Binary file added
BIN
+82.4 KB
.../services/discover.spec.ts-snapshots/live-app-sign-transaction-output-win32.png
Oops, something went wrong.
Binary file added
BIN
+77.9 KB
...ts/specs/services/discover.spec.ts-snapshots/live-app-verify-address-darwin.png
Oops, something went wrong.
Binary file added
BIN
+71.7 KB
...sts/specs/services/discover.spec.ts-snapshots/live-app-verify-address-linux.png
Oops, something went wrong.
Binary file added
BIN
+77.5 KB
...s/services/discover.spec.ts-snapshots/live-app-verify-address-output-darwin.png
Oops, something went wrong.
Binary file added
BIN
+72.1 KB
...cs/services/discover.spec.ts-snapshots/live-app-verify-address-output-linux.png
Oops, something went wrong.
Binary file added
BIN
+58.6 KB
...cs/services/discover.spec.ts-snapshots/live-app-verify-address-output-win32.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...sts/specs/services/discover.spec.ts-snapshots/live-app-verify-address-win32.png
Oops, something went wrong.
Binary file modified
BIN
-3.23 KB
(96%)
...s/specs/services/discover.spec.ts-snapshots/live-disclaimer-accepted-darwin.png
Oops, something went wrong.
Binary file modified
BIN
+1.3 KB
(100%)
...ts/specs/services/discover.spec.ts-snapshots/live-disclaimer-accepted-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.19 KB
(95%)
...ts/specs/services/discover.spec.ts-snapshots/live-disclaimer-accepted-win32.png
Oops, something went wrong.
Binary file removed
BIN
-95.1 KB
...esktop/tests/specs/services/discover.spec.ts-snapshots/open-test-app-darwin.png
Diff not rendered.
Binary file removed
BIN
-86.9 KB
...desktop/tests/specs/services/discover.spec.ts-snapshots/open-test-app-linux.png
Diff not rendered.
Binary file removed
BIN
-88.9 KB
...desktop/tests/specs/services/discover.spec.ts-snapshots/open-test-app-win32.png
Diff not rendered.
13 changes: 0 additions & 13 deletions
13
apps/ledger-live-desktop/tests/utils/dummy-app-build/asset-manifest.json
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
apps/ledger-live-desktop/tests/utils/dummy-app-build/index.html
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
apps/ledger-live-desktop/tests/utils/dummy-app-build/static/css/main.0419f816.css
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
apps/ledger-live-desktop/tests/utils/dummy-app-build/static/css/main.0419f816.css.map
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
apps/ledger-live-desktop/tests/utils/dummy-app-build/static/js/main.fbd28f85.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
apps/ledger-live-desktop/tests/utils/dummy-app-build/static/js/main.fbd28f85.js.map
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
apps/ledger-live-desktop/tests/utils/dummy-live-app/README.md
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,19 @@ | ||
# Ledger Live Dummy Platform App | ||
|
||
The purpose of this app is to allow automated front end testing of Ledger Live Platform apps, and verify that Ledger Live correctly: | ||
- handles the rendering of external Live Apps | ||
- handles calls of the Live SDK from external Live apps | ||
|
||
The app is a simple [Create React App](https://github.com/facebook/create-react-app) which uses the [Ledger Live App SDK](https://www.npmjs.com/package/@ledgerhq/live-app-sdk). It has some buttons that have hardcoded responses that can be triggered from the playwright tests, thus allowing us to check the UI. This means the app isn't suitable for manual testing or full E2E testing since it is not dynamic, and does not make calls to external services or the Nano itself. | ||
|
||
## How to run locally for development | ||
|
||
Run `pnpm --filter="dummy-live-app" start`. | ||
|
||
## Quick script to build the app from scratch | ||
|
||
To use the Dummy app in the Playwright tests, you must install and build the dependencies and source code for the dummy app. To do this run the following from the root folder of this monorepo: | ||
|
||
`pnpm clean && pnpm --filter="dummy-live-app" i && pnpm --filter="dummy-live-app" build` | ||
|
||
Then run `pnpm --filter="dummy-live-app" serve` |
37 changes: 37 additions & 0 deletions
37
apps/ledger-live-desktop/tests/utils/dummy-live-app/package.json
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 @@ | ||
{ | ||
"name": "dummy-live-app", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@ledgerhq/live-app-sdk": "^0.5.0", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.7.13", | ||
"@types/react": "^17.0.20", | ||
"@types/react-dom": "^17.0.9", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-scripts": "5.0.0", | ||
"typescript": "^4.4.2" | ||
}, | ||
"scripts": { | ||
"start": "cross-env DISABLE_ESLINT_PLUGIN=true react-scripts start", | ||
"build": "cross-env DISABLE_ESLINT_PLUGIN=true react-scripts build", | ||
"test": "cross-env DISABLE_ESLINT_PLUGIN=true react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^7.0.3" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
apps/ledger-live-desktop/tests/utils/dummy-live-app/public/index.html
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,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="Ledger Live App created using create-react-app" | ||
/> | ||
<title>Ledger Live App</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
34 changes: 34 additions & 0 deletions
34
apps/ledger-live-desktop/tests/utils/dummy-live-app/src/App.css
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,34 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 10vmin; | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.button-container { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
width: 100%; | ||
} | ||
|
||
.output-container { | ||
background-color: black; | ||
text-align: start; | ||
overflow: scroll; | ||
/* margin: 10; */ | ||
font-size: 12px; | ||
width: 90%; | ||
} |
Oops, something went wrong.