diff --git a/.editorconfig b/.editorconfig index 0f1786729b4..5c7739f36c2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true + +[maestro/**/*.yaml] +indent_size = 4 diff --git a/maestro/02-launch-login/C310-launch-no-crash.yaml b/maestro/02-launch-login/C310-launch-no-crash.yaml index e7794752863..1cf2d4819e5 100644 --- a/maestro/02-launch-login/C310-launch-no-crash.yaml +++ b/maestro/02-launch-login/C310-launch-no-crash.yaml @@ -5,6 +5,8 @@ # 1. User is able to open Edge without crashing appId: co.edgesecure.app +tags: +- launch --- - runFlow: file: ../common/launch.yaml diff --git a/maestro/02-launch-login/C311-relaunch-no-crash.yaml b/maestro/02-launch-login/C311-relaunch-no-crash.yaml index 93a6de00810..d20baa44cdc 100644 --- a/maestro/02-launch-login/C311-relaunch-no-crash.yaml +++ b/maestro/02-launch-login/C311-relaunch-no-crash.yaml @@ -5,11 +5,12 @@ # 1. Edge should not crash when relaunching the App appId: co.edgesecure.app +tags: +- launch +- crash --- - runFlow: file: ../common/launch.yaml - - pressKey: home - - runFlow: file: ../common/launch.yaml diff --git a/maestro/02-launch-login/C314-login-no-2fa.yaml b/maestro/02-launch-login/C314-login-no-2fa.yaml new file mode 100644 index 00000000000..fc2c15e5d3f --- /dev/null +++ b/maestro/02-launch-login/C314-login-no-2fa.yaml @@ -0,0 +1,39 @@ +# Priority: Critical +# Test ID: C314 +# Title: Login with Username and Password +# Expected Result: +# 1. User is able to login to a their account without being IP2FA blocked + +appId: co.edgesecure.app +tags: +- login +--- + +# Launch, hopefully with the correct account already logged in +- runFlow: ../common/launch.yaml +- runScript: ../env.js + +- runFlow: + when: + visible: Security Alerts + file: ../common/close-modal-hack.yaml + +# Check we are logged into the correct account +- assertVisible: "${output.logins.C314.USERNAME}" + +- runFlow: + when: + visible: Exit PIN + file: ../common/exit-pin-login.yaml + +# Login scene +- assertVisible: Username + +- pressKey: Enter +- inputText: ${output.logins.C314.PASSWORD} +- pressKey: Enter + +# Wait for the wallets to appear +- extendedWaitUntil: + visible: LTC C314 + timeout: 30000 diff --git a/maestro/02-launch-login/C431-create-account.yaml b/maestro/02-launch-login/C431-create-account.yaml new file mode 100644 index 00000000000..7d23de4c940 --- /dev/null +++ b/maestro/02-launch-login/C431-create-account.yaml @@ -0,0 +1,79 @@ +# Priority: Critical +# Test ID: C431 +# Title: Account will successfully create and goes to wallets list screen +# Expected Result: +# 1. Tapping Create takes user to new Wallet List Scene with: +# - BTC +# - ETH +# - LTC +# - BCH +# - DASH + +appId: co.edgesecure.app +tags: +- create +- account +--- +- runFlow: + file: ../common/launch-cleared.yaml +- runFlow: + when: + visible: Security Alerts + file: ../common/cancel.yaml +- tapOn: Create account +- assertVisible: Username +- tapOn: Username +- inputText: test- +- inputRandomText +- pressKey: Enter +- extendedWaitUntil: + notVisible: Choose Username + timeout: 10000 +- tapOn: Password +- inputText: Test123456 +- pressKey: Enter +- tapOn: Confirm Password +- inputText: Test123456 +- pressKey: Enter +- inputText: 1111 +- pressKey: Enter +- tapOn: Next +- tapOn: I understand that my funds are held securely on this device, not by Edge +- tapOn: I understand that if I lose this device or uninstall the app, my digital assets can only be recovered with my username and password +- tapOn: I understand that if I lose my username and password, Edge will not be able to recover my account, unless I set up password recovery +- tapOn: I understand that I am responsible for safekeeping of my passwords, private key pairs, PIN, and any other codes to access the software. Edge is not responsible if my information is compromised or accessed by a 3rd party where funds are lost +- tapOn: Confirm +- tapOn: Create +- assertVisible: Choose Wallets to Add + +# Allow notifications +- runFlow: + when: + visible: Security is Our Priority + file: ../common/enable-notifications.yaml + +# Pin scene +- inputText: 1111 + +- extendedWaitUntil: + visible: BTC + timeout: 15000 + +- tapOn: + point: 50%,95% + +- extendedWaitUntil: + visible: My Bitcoin + timeout: 60000 +- extendedWaitUntil: + visible: My Bitcoin Cash + timeout: 60000 +- extendedWaitUntil: + visible: My Dash + timeout: 60000 +- extendedWaitUntil: + visible: My Ether + timeout: 60000 +- extendedWaitUntil: + visible: My Litecoin + timeout: 60000 diff --git a/maestro/02-launch-login/C753-login-2fa.yaml b/maestro/02-launch-login/C753-login-2fa.yaml new file mode 100644 index 00000000000..98ec0fb28d8 --- /dev/null +++ b/maestro/02-launch-login/C753-login-2fa.yaml @@ -0,0 +1,43 @@ +# Priority: Critical +# Test ID: C314 +# Title: Login with Username and Password +# Expected Result: +# 1. User is able to login with a valid Username + Password + Backup Code + +appId: co.edgesecure.app +tags: +- login +- 2fa +--- +- runFlow: + file: ../common/launch-cleared.yaml +- runScript: ../env.js + +# Landing scene +- tapOn: Already have an account? Sign in + +# Username +- tapOn: + id: usernameFormField + optional: true +- inputText: ${output.logins.C753.USERNAME} +- pressKey: Enter + +# Password +- tapOn: + id: passwordFormField + optional: true +- inputText: ${output.logins.C753.PASSWORD} +- pressKey: Enter + +# 2FA - Backup code option +- tapOn: Enter Backup Code +- inputText: ${output.logins.C753.BACKUP_CODE} +- tapOn: + text: Submit + retryTapIfNoChange: false + +# Wallet list scene +- extendedWaitUntil: + visible: LTC C753 + timeout: 60000 diff --git a/maestro/02-launch-login/entrypoint.yaml b/maestro/02-launch-login/entrypoint.yaml index 166b47185d4..d148fb31baa 100644 --- a/maestro/02-launch-login/entrypoint.yaml +++ b/maestro/02-launch-login/entrypoint.yaml @@ -4,3 +4,10 @@ appId: co.edgesecure.app file: C310-launch-no-crash.yaml - runFlow: file: C311-relaunch-no-crash.yaml +- runFlow: + file: C753-login-2fa.yaml +- runFlow: + file: C314-login-no-2fa.yaml +- runFlow: + file: C431-create-account.yaml + diff --git a/maestro/common/cancel.yaml b/maestro/common/cancel.yaml new file mode 100644 index 00000000000..218285892c7 --- /dev/null +++ b/maestro/common/cancel.yaml @@ -0,0 +1,5 @@ +# Checks that the cancel button is visible and taps on it +appId: co.edgesecure.app +--- +- assertVisible: 'Cancel' +- tapOn: 'Cancel' diff --git a/maestro/common/close-modal-hack.yaml b/maestro/common/close-modal-hack.yaml index 100a7cbf566..709021f3f43 100644 --- a/maestro/common/close-modal-hack.yaml +++ b/maestro/common/close-modal-hack.yaml @@ -4,4 +4,4 @@ appId: co.edgesecure.app --- - tapOn: - point: '0%,50%' # Left side + verticlaly middle edge of the screen + point: '50%,0%' # Top center of screen diff --git a/maestro/common/enable-notifications.yaml b/maestro/common/enable-notifications.yaml new file mode 100644 index 00000000000..226086edf64 --- /dev/null +++ b/maestro/common/enable-notifications.yaml @@ -0,0 +1,15 @@ +# Title: Enable notifications +# Expected Result: +# 1. User is able to enable notifications + + +appId: co.edgesecure.app +--- +- tapOn: "Enable" +# Android system settings +- tapOn: "Notifications" +- assertVisible: "Edge" +- tapOn: + id: "com.android.settings:id/switch_widget" +- back +- back diff --git a/maestro/common/exit-pin-login.yaml b/maestro/common/exit-pin-login.yaml new file mode 100644 index 00000000000..a6f4fe61acb --- /dev/null +++ b/maestro/common/exit-pin-login.yaml @@ -0,0 +1,5 @@ +# Launches the app with a cleared cache, and waits for the Edge logo to appear. +appId: co.edgesecure.app +--- +- assertVisible: Exit PIN +- tapOn: Exit PIN diff --git a/maestro/common/input-2fa.yaml b/maestro/common/input-2fa.yaml new file mode 100644 index 00000000000..ccb8aac8411 --- /dev/null +++ b/maestro/common/input-2fa.yaml @@ -0,0 +1,9 @@ +# Inputs the +appId: co.edgesecure.app +env: + BACKUP_CODE: ${BACKUP_CODE} +--- +- tapOn: + containsChild: Backup Key +- inputText: ${BACKUP_CODE} +- tapOn: Submit diff --git a/maestro/common/launch-cleared.yaml b/maestro/common/launch-cleared.yaml index 64f111ea3c2..38e5c95a3da 100644 --- a/maestro/common/launch-cleared.yaml +++ b/maestro/common/launch-cleared.yaml @@ -4,6 +4,6 @@ appId: co.edgesecure.app - launchApp: clearState: true - extendedWaitUntil: - visible: 'Edge Logo' + visible: 'App logo' timeout: 30000 - assertNotVisible: 'Oops!' diff --git a/maestro/common/launch.yaml b/maestro/common/launch.yaml index 94a87340f6b..b9ff9454fda 100644 --- a/maestro/common/launch.yaml +++ b/maestro/common/launch.yaml @@ -3,6 +3,6 @@ appId: co.edgesecure.app --- - launchApp - extendedWaitUntil: - visible: 'Edge Logo' + visible: 'App logo' timeout: 30000 - assertNotVisible: 'Oops!' diff --git a/maestro/common/login.yaml b/maestro/common/login.yaml new file mode 100644 index 00000000000..710d81937e4 --- /dev/null +++ b/maestro/common/login.yaml @@ -0,0 +1,23 @@ +# Launches the app with a cleared cache, and logs in with the CREDENTIALS environment variable. +appId: co.edgesecure.app +env: + CREDENTIALS: ${output.CREDENTIALS} +--- +- runFlow: + file: launch-cleared.yaml +- assertVisible: "Username" +- tapOn: + id: usernameFormField +- inputText: ${CREDENTIALS.USERNAME} +- tapOn: + id: passwordFormField +- inputText: ${CREDENTIALS.PASSWORD} +- hideKeyboard +- pressKey: Enter +- runFlow: + when: + visible: Two Factor Authentication + file: input-2fa.yaml + env: + BACKUP_CODE: ${CREDENTIALS.BACKUP_CODE} + \ No newline at end of file diff --git a/maestro/common/scroll-to-tappable-row.yaml b/maestro/common/scroll-to-tappable-row.yaml new file mode 100644 index 00000000000..a0e12a75228 --- /dev/null +++ b/maestro/common/scroll-to-tappable-row.yaml @@ -0,0 +1,9 @@ +appId: co.edgesecure.app +--- +- scrollUntilVisible: + element: ${ROW} + direction: "DOWN" + timeout: 1000 + speed: 35 + visibilityPercentage: 100 +- tapOn: ${ROW} diff --git a/src/components/scenes/CreateWalletSelectCryptoScene.tsx b/src/components/scenes/CreateWalletSelectCryptoScene.tsx index b651d80579d..7f15e4b35aa 100644 --- a/src/components/scenes/CreateWalletSelectCryptoScene.tsx +++ b/src/components/scenes/CreateWalletSelectCryptoScene.tsx @@ -202,15 +202,18 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { const renderCreateWalletRow: ListRenderItem = useHandler(item => { const { key, displayName, pluginId, tokenId } = item.item - + const value = selectedItems[key] const toggle = ( handleCreateWalletToggle(key)} /> ) @@ -219,6 +222,7 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { handleCreateWalletToggle(key)} rightSide={toggle}