-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #711 from dorianvp/detox-zip320
Add E2E test for TEX address
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { log, device, by, element, expect } = require('detox'); | ||
|
||
import { loadTestWallet } from './e2e-utils/loadTestWallet.js'; | ||
|
||
const sleep = ms => new Promise(r => setTimeout(r, ms)); | ||
|
||
describe('Renders wallet data correctly.', () => { | ||
it('loads a wallet', loadTestWallet); | ||
it('parses the TEX address and correctly renders the confirm screen', async () => { | ||
await waitFor(element(by.id('vt-1'))) | ||
.toExist() | ||
.withTimeout(30000); | ||
await element(by.text('SEND')).tap(); | ||
|
||
// Address taken from the reference implementation | ||
await element(by.id('send.addressplaceholder')).replaceText('tex1s2rt77ggv6q989lr49rkgzmh5slsksa9khdgte'); | ||
|
||
await waitFor(element(by.id('send.address.check'))) | ||
.toExist() | ||
.withTimeout(5000); | ||
|
||
await element(by.id('send.amount')).replaceText('0'); | ||
await element(by.id('send.scroll-view')).scrollTo('bottom'); | ||
await waitFor(element(by.id('send.button'))) | ||
.toBeVisible() | ||
.withTimeout(5000); | ||
await element(by.id('send.button')).tap(); | ||
|
||
await expect(element(by.id('send.confirm.scroll-view'))).toExist(); | ||
await expect(element(by.id('send.confirm.scroll-view'))).toBeVisible(20); | ||
await element(by.id('send.confirm.scroll-view')).scrollTo('bottom'); | ||
}); | ||
}); |