|
|
@ -4,6 +4,7 @@ const bitcoin = require('bitcoinjs-lib'); |
|
|
|
const assert = require('assert'); |
|
|
|
|
|
|
|
describe('BlueWallet UI Tests', () => { |
|
|
|
|
|
|
|
it('selftest passes', async () => { |
|
|
|
await waitFor(element(by.id('WalletsList'))) |
|
|
|
.toBeVisible() |
|
|
@ -19,6 +20,16 @@ describe('BlueWallet UI Tests', () => { |
|
|
|
.withTimeout(300 * 1000); |
|
|
|
}); |
|
|
|
|
|
|
|
it('can create wallet, reload app and it persists', async () => { |
|
|
|
await yo('WalletsList'); |
|
|
|
|
|
|
|
await helperCreateWallet(); |
|
|
|
|
|
|
|
await device.launchApp({ newInstance: true }); |
|
|
|
await yo('WalletsList'); |
|
|
|
await expect(element(by.id('cr34t3d'))).toBeVisible(); |
|
|
|
}); |
|
|
|
|
|
|
|
it('can encrypt storage, with plausible deniability', async () => { |
|
|
|
await yo('WalletsList'); |
|
|
|
|
|
|
@ -95,10 +106,13 @@ describe('BlueWallet UI Tests', () => { |
|
|
|
await element(by.type('android.widget.EditText')).typeText('qqq'); |
|
|
|
await element(by.text('OK')).tap(); |
|
|
|
await expect(element(by.text('Password is currently in use. Please, try a different password.'))).toBeVisible(); |
|
|
|
if (process.env.TRAVIS) await sleep(3000); // hopefully helps prevent crash
|
|
|
|
await element(by.text('OK')).tap(); |
|
|
|
if (process.env.TRAVIS) await sleep(3000); // hopefully helps prevent crash
|
|
|
|
|
|
|
|
// trying new password, but will mistype
|
|
|
|
await element(by.id('CreateFakeStorageButton')).tap(); |
|
|
|
if (process.env.TRAVIS) await sleep(3000); // hopefully helps prevent crash
|
|
|
|
await element(by.type('android.widget.EditText')).typeText('passwordForFakeStorage'); |
|
|
|
await element(by.text('OK')).tap(); |
|
|
|
await expect(element(by.text('Retype password'))).toBeVisible(); |
|
|
@ -294,16 +308,6 @@ describe('BlueWallet UI Tests', () => { |
|
|
|
await yo('fake_wallet'); // success, we are observing wallet in FAKE storage. wallet from main storage is lost
|
|
|
|
}); |
|
|
|
|
|
|
|
it('can create wallet, reload app and it persists', async () => { |
|
|
|
await yo('WalletsList'); |
|
|
|
|
|
|
|
await helperCreateWallet(); |
|
|
|
|
|
|
|
await device.launchApp({ newInstance: true }); |
|
|
|
await yo('WalletsList'); |
|
|
|
await expect(element(by.id('cr34t3d'))).toBeVisible(); |
|
|
|
}); |
|
|
|
|
|
|
|
it('can import BIP84 mnemonic, fetch balance & transactions, then create a transaction', async () => { |
|
|
|
if (!process.env.HD_MNEMONIC_BIP84) { |
|
|
|
console.error('process.env.HD_MNEMONIC_BIP84 not set, skipped'); |
|
|
|