-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
265 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# createToken.yaml | ||
|
||
# This testnut flow is just a temporary playground | ||
appId: com.agron.enuts.dev | ||
name: "Running createToken.yaml now..." | ||
# onFlowComplete: | ||
# - runFlow: createToken.yaml | ||
--- | ||
- tapOn: | ||
id: "wallet-Send" |
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,88 @@ | ||
# init.yaml | ||
|
||
# MAESTRO commands: https://maestro.mobile.dev/api-reference/commands | ||
|
||
# TODO use different images for different app states | ||
# TODO test in different locales: https://maestro.mobile.dev/advanced/testing-in-different-locales | ||
|
||
appId: com.agron.enuts.dev | ||
# https://maestro.mobile.dev/cli/tags | ||
tags: | ||
- clean-state-build | ||
onFlowComplete: | ||
- runFlow: unlock.yaml | ||
--- | ||
- launchApp: | ||
# this will start the app with a clean state, showing the onboarding screen | ||
clearState: true | ||
label: 'Starting app...' | ||
- runScript: ../main.js | ||
# make sure the onboarding screen is displayed | ||
- assertVisible: ${output.main.onboarding.header1} | ||
# test onboarding screen | ||
- tapOn: ${output.main.onboarding.nextBtn} | ||
- assertVisible: ${output.main.onboarding.header2} | ||
- swipe: | ||
direction: LEFT | ||
- assertVisible: ${output.main.onboarding.header3} | ||
- swipe: | ||
direction: RIGHT | ||
- assertVisible: ${output.main.onboarding.header2} | ||
- tapOn: | ||
text: ${output.main.onboarding.skipBtn} | ||
label: "Skipped onboarding after successfully swiping through the screens" | ||
# setup a pin | ||
- assertVisible: | ||
id: "11" | ||
enabled: false | ||
label: "Check that the PIN confirm button is disabled" | ||
- tapOn: "1" | ||
- tapOn: "2" | ||
- tapOn: "3" | ||
# delete 1 char | ||
- tapOn: | ||
id: "10" | ||
label: "Delete 1 char" | ||
- tapOn: "3" | ||
- tapOn: "4" | ||
- assertVisible: | ||
id: "11" | ||
enabled: true | ||
label: "Check that the PIN confirm button is enabled" | ||
# confirm input | ||
- tapOn: | ||
id: "11" | ||
label: "Confirm PIN input after min. 4 chars" | ||
# check confirm pin screen is visible | ||
- assertVisible: "Please confirm your PIN." | ||
- assertVisible: "Back" | ||
# go back and re-type pin | ||
- tapOn: | ||
text: ${output.main.onboarding.backBtn} | ||
label: "Test the back button" | ||
- assertVisible: | ||
id: "11" | ||
enabled: false | ||
- tapOn: "1" | ||
- tapOn: "2" | ||
- tapOn: "3" | ||
- tapOn: "4" | ||
- tapOn: | ||
id: "11" | ||
# confirm with wrong PIN | ||
- tapOn: "1" | ||
- tapOn: "3" | ||
- tapOn: "2" | ||
- tapOn: "4" | ||
- tapOn: | ||
id: "11" | ||
label: "Test wrong PIN confirmation" | ||
- assertVisible: "Please confirm your PIN." | ||
- tapOn: "1" | ||
- tapOn: "2" | ||
- tapOn: "3" | ||
- tapOn: "4" | ||
- tapOn: | ||
id: "11" | ||
label: "Test suites of init.yaml passed!" | ||
# at this point, the pin should be set |
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,99 @@ | ||
# newMint.yaml | ||
|
||
# This testnut flow is just a temporary playground | ||
appId: com.agron.enuts.dev | ||
name: "Running newMint.yaml now..." | ||
onFlowComplete: | ||
- runFlow: createToken.yaml | ||
--- | ||
- assertVisible: | ||
text: "Get started" | ||
# add testnut mint | ||
- tapOn: | ||
text: "Add mint URL" | ||
label: "Focusing text input and typing an invalid mint URL" | ||
- assertVisible: "Add a new mint" | ||
# focus text input | ||
- tapOn: "Mint URL" | ||
- assertVisible: | ||
text: "Mint URL" | ||
focused: true | ||
# type invalid URL | ||
- inputText: "testnut" | ||
- tapOn: "Add mint" | ||
- assertVisible: | ||
text: "Network request failed" | ||
label: "Checking that the invalid URL error message is displayed" | ||
# type in valid testnut URL | ||
- tapOn: "Mint URL" | ||
# https://maestro.mobile.dev/api-reference/commands/erasetext | ||
- eraseText | ||
- inputText: | ||
text: ${output.main.mints.testnut} | ||
label: "Typi${output.main.mints.testnut}ng a valid testnut URL" | ||
- tapOn: "Add mint" | ||
- assertVisible: "Mint added!" | ||
# mint fake Ecash | ||
- tapOn: "Yes" | ||
# navigates to the invoice amount screen | ||
- assertVisible: | ||
text: "Create invoice" | ||
label: "Checking that the invoice amount screen is displayed" | ||
# make sure amount input is focused | ||
- assertVisible: | ||
id: "amountInput" | ||
focused: true | ||
# test bad case with empty input | ||
- tapOn: | ||
text: "Continue" | ||
label: "Testing the continue button with empty input" | ||
- assertVisible: "Create invoice" | ||
- inputText: "100" | ||
- tapOn: | ||
text: "Continue" | ||
label: "Testing the continue button with a valid amount" | ||
- extendedWaitUntil: | ||
visible: "100 Sats minted!" | ||
timeout: 10000 | ||
# User can navigate back to the dashboard by pressing the "Back to dashboard" button | ||
- tapOn: | ||
text: "Back to dashboard" | ||
label: "Navigating back to the dashboard" | ||
- assertVisible: | ||
text: "Send" | ||
label: "Checking that the dashboard is displayed" | ||
- assertVisible: "Scan" | ||
- assertVisible: | ||
text: "Receive" | ||
# Check first history entry | ||
- assertVisible: "Lightning" | ||
- assertVisible: "+100 Sats" | ||
- tapOn: | ||
text: "Lightning" | ||
label: "Checking that the history entry is a Lightning transaction" | ||
# Check Transaction details | ||
- assertVisible: "Lightning invoice" | ||
- assertVisible: "Settle time" | ||
- assertVisible: "Invoice" | ||
- assertVisible: "Payment hash" | ||
- assertVisible: "Fee" | ||
- assertVisible: "Show QR code" | ||
# Check the mint management screen | ||
- tapOn: | ||
id: ${output.main.navBackBtn} | ||
- tapOn: | ||
id: ${output.main.nav.options} | ||
- tapOn: "Mint management" | ||
- assertVisible: "Mints" | ||
- tapOn: ${output.main.mints.testnut} | ||
- assertVisible: "Balance" | ||
- repeat: | ||
times: 2 | ||
commands: | ||
- tapOn: | ||
id: ${output.main.navBackBtn} | ||
- tapOn: | ||
id: ${output.main.nav.wallet} | ||
# add the eNuts mint | ||
# - tapOn: "Use the eNuts mint" | ||
# - assertVisible: "Mint added!" |
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,41 @@ | ||
# unlock.yaml | ||
|
||
appId: com.agron.enuts.dev | ||
onFlowComplete: | ||
- runFlow: newMint.yaml | ||
--- | ||
# close app | ||
- stopApp: | ||
label: "Running unlock.yaml now. Closing app..." | ||
# re-launch app | ||
- launchApp: | ||
label: "Re-launching app to test PIN unlock..." | ||
# make sure the pin prompt is displayed | ||
- assertVisible: "Welcome back!" | ||
# test wrong pin | ||
# - repeat: | ||
# times: 3 | ||
# label: "Typing a wrong PIN 3 times to lock the wallet" | ||
# commands: | ||
# - tapOn: "4" | ||
# - tapOn: "3" | ||
# - tapOn: "2" | ||
# - tapOn: "1" | ||
# - tapOn: | ||
# id: "11" | ||
# - assertVisible: | ||
# text: "Wallet locked" | ||
# label: "Check that the wallet is locked" | ||
# # now the wallet is locked for 1min | ||
# - extendedWaitUntil: | ||
# visible: "Welcome back!" # waits until the text "Welcome back!" is visible again | ||
# timeout: 65000 | ||
# label: "Waiting for 60s until wallet is unlocked again" | ||
# the wallet should be unlocked now | ||
- tapOn: "1" | ||
- tapOn: "2" | ||
- tapOn: "3" | ||
- tapOn: "4" | ||
- tapOn: | ||
id: "11" | ||
label: "Test suites of unlock.yaml passed!" |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
output.main = { | ||
nav: { | ||
wallet: 'navWallet', | ||
contacts: 'navContacts', | ||
options: 'navOptions', | ||
}, | ||
navBackBtn: 'navBackBtn', | ||
onboarding: { | ||
nextBtn: 'Next', | ||
skipBtn: 'Skip', | ||
backBtn: 'Back', | ||
header1: 'eNuts & Ecash', | ||
header2: 'Cashu & Mints', | ||
header3: 'Send & receive', | ||
}, | ||
mints: { | ||
eNuts: 'legend.lnbits.com/cashu/api/v1/AptDNABNBXv8gpuywhx6NV', | ||
testnut: 'testnut.cashu.space', | ||
} | ||
} |
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