Browse Source

OPS: hopefully helps prevent crash on travisci

master
Overtorment 5 years ago
committed by GitHub
parent
commit
df5e0e3d54
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      package-lock.json
  2. 2
      package.json
  3. 24
      tests/e2e/bluewallet.spec.js

22
package-lock.json

@ -3109,9 +3109,9 @@
}
},
"bluebird": {
"version": "3.5.5",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz",
"integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==",
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"blueimp-md5": {
@ -4368,9 +4368,9 @@
"dev": true
},
"detox": {
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/detox/-/detox-16.1.1.tgz",
"integrity": "sha512-0f0PFOcx/w4Gcm0KQHgJTnrLvrB+4DBu95VdBgd/z/6SyGPmU8+tgCIdshHvePStUfi7i2EBj4zpYMGE30sLFw==",
"version": "16.4.0",
"resolved": "https://registry.npmjs.org/detox/-/detox-16.4.0.tgz",
"integrity": "sha512-2dB6bJ9GCM7BuZCWubSRQLX1QLaKvPue9zu4+jcDMhhbQL08KKIClb2yelMalSyjtM04hX7OUw+SBArIwU13Dg==",
"dev": true,
"requires": {
"@babel/core": "^7.4.5",
@ -4388,7 +4388,7 @@
"sanitize-filename": "^1.6.1",
"shell-utils": "^1.0.9",
"tail": "^2.0.0",
"telnet-client": "0.15.3",
"telnet-client": "1.2.8",
"tempfile": "^2.0.0",
"which": "^1.3.1",
"ws": "^3.3.1",
@ -13451,12 +13451,12 @@
"dev": true
},
"telnet-client": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/telnet-client/-/telnet-client-0.15.3.tgz",
"integrity": "sha512-GSfdzQV0BKIYsmeXq7bJFJ2wHeJud6icaIxCUf6QCGQUD6R0BBGbT1+yLDhq67JRdgRpwyPwUbV7JxFeRrZomQ==",
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/telnet-client/-/telnet-client-1.2.8.tgz",
"integrity": "sha512-W+w4k3QAmULVNhBVT2Fei369kGZCh/TH25M7caJAXW+hLxwoQRuw0di3cX4l0S9fgH3Mvq7u+IFMoBDpEw/eIg==",
"dev": true,
"requires": {
"bluebird": "3.5.x"
"bluebird": "^3.5.4"
}
},
"temp": {

2
package.json

@ -10,7 +10,7 @@
"babel-eslint": "^10.0.2",
"babel-jest": "^24.9.0",
"babel-preset-flow": "^6.23.0",
"detox": "16.1.1",
"detox": "^16.4.0",
"eslint": "^6.5.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.18.0",

24
tests/e2e/bluewallet.spec.js

@ -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');

Loading…
Cancel
Save