mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
TST: remove almost duplicate e2e test
This commit is contained in:
parent
87fea08d79
commit
fa0832a6e1
@ -471,59 +471,6 @@ describe('BlueWallet UI Tests', () => {
|
||||
process.env.TRAVIS && require('fs').writeFileSync(lockFile, '1');
|
||||
});
|
||||
|
||||
it('can import zpub as watch-only and create PSBT, and scan txhex back', async () => {
|
||||
const lockFile = '/tmp/travislock.' + hashIt(jasmine.currentTest.fullName);
|
||||
if (process.env.TRAVIS) {
|
||||
if (require('fs').existsSync(lockFile))
|
||||
return console.warn('skipping', JSON.stringify(jasmine.currentTest.fullName), 'as it previously passed on Travis');
|
||||
}
|
||||
await helperImportWallet(
|
||||
'zpub6r7jhKKm7BAVx3b3nSnuadY1WnshZYkhK8gKFoRLwK9rF3Mzv28BrGcCGA3ugGtawi1WLb2vyjQAX9ZTDGU5gNk2bLdTc3iEXr6tzR1ipNP',
|
||||
'Imported Watch-only',
|
||||
'0.002 BTC',
|
||||
);
|
||||
|
||||
await element(by.id('SendButton')).tap();
|
||||
await element(by.text('OK')).tap();
|
||||
|
||||
await element(by.id('AddressInput')).replaceText('bc1q063ctu6jhe5k4v8ka99qac8rcm2tzjjnuktyrl');
|
||||
await element(by.id('BitcoinAmountInput')).typeText('0.0005\n');
|
||||
|
||||
// setting fee rate:
|
||||
const feeRate = 1;
|
||||
await element(by.id('chooseFee')).tap();
|
||||
await element(by.id('feeCustom')).tap();
|
||||
await element(by.type('android.widget.EditText')).typeText(feeRate + '');
|
||||
await element(by.text('OK')).tap();
|
||||
|
||||
if (process.env.TRAVIS) await sleep(5000);
|
||||
try {
|
||||
await element(by.id('CreateTransactionButton')).tap();
|
||||
} catch (_) {}
|
||||
|
||||
await yo('TextHelperForPSBT');
|
||||
|
||||
// now lets test scanning back QR with txhex. this should lead straight to broadcast dialog
|
||||
|
||||
await element(by.id('PsbtWithHardwareScrollView')).swipe('up', 'fast', 1); // in case emu screen is small and it doesnt fit
|
||||
await element(by.id('PsbtTxScanButton')).tap(); // opening camera
|
||||
|
||||
// tapping 10 times invisible button is a backdoor:
|
||||
for (let c = 0; c <= 5; c++) {
|
||||
await element(by.id('ScanQrBackdoorButton')).tap();
|
||||
await sleep(1000);
|
||||
}
|
||||
|
||||
const randomTxHex =
|
||||
'020000000001011628f58e8e81bfcfff1b106bb8968e342fb86f09aa810ed2939e43d5127c51040200000000000000000227e42d000000000017a914c679a827d57a9b8b539515dbafb4e573d2bcc6ca87df15cf02000000002200209705cdfcbc459a220e7f39ffe547a31335505c2357f452ae12a22b9ae36ea59d04004730440220626c5205a6f49d1dd1577c85c0af4c5fc70f41de61f891d71a5cf57af09110d4022045bcb1e7d4e93e1a9baf6ae1ad0b4087c9e9f73ec366e97576912377d9f6904301473044022044aea98e8983f09cb0639f08d34526bb7e3ed47d208b7bf714fb29a1b5f9535a02200baa510b94cf434775b4aa2184682f2fb33f15e5e76f79aa0885e7ee12bdc8f70169522102e67ce679d617d674d68eea95ecb166c67b4b5520105c4745adf37ce8a40b92dc21029ff54b8bf26dbddd7bd4336593d2ff17519d5374989f36a6f5f8239675ff79a421039000ee2853c6db4bd956e80b1ecfb8711bf3e0a9a8886d15450c29458b60473153ae00000000';
|
||||
await element(by.id('scanQrBackdoorInput')).replaceText(randomTxHex);
|
||||
await element(by.id('scanQrBackdoorOkButton')).tap();
|
||||
await expect(element(by.id('ScanQrBackdoorButton'))).toBeNotVisible();
|
||||
await yo('PsbtWithHardwareWalletBroadcastTransactionButton');
|
||||
|
||||
process.env.TRAVIS && require('fs').writeFileSync(lockFile, '1');
|
||||
});
|
||||
|
||||
/**
|
||||
* test plan:
|
||||
* 1. import wallet
|
||||
|
Loading…
Reference in New Issue
Block a user