Merge pull request #2525 from BlueWallet/TSTwatchonly

TST:  e2e: watch-only -> receive (& receive with amount)
This commit is contained in:
GLaDOS 2021-01-29 15:58:11 +00:00 committed by GitHub
commit 71f57db6cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ describe('BlueWallet UI Tests', () => {
process.env.TRAVIS && require('fs').writeFileSync(lockFile, '1');
});
it('can create wallet, reload app and it persists. then go to receive screen, set custom amount and label.', async () => {
it('can create wallet, reload app and it persists. then go to receive screen, set custom amount and label. Dismiss modal and go to WalletsList.', async () => {
const lockFile = '/tmp/travislock.' + hashIt(jasmine.currentTest.fullName);
if (process.env.TRAVIS) {
if (require('fs').existsSync(lockFile))
@ -512,6 +512,26 @@ describe('BlueWallet UI Tests', () => {
'0.00030666 BTC',
);
await element(by.id('ReceiveButton')).tap();
try {
// in case emulator has no google services and doesnt support pushes
// we just dont show this popup
await element(by.text(`No, and don't ask me again`)).tap();
} catch (_) {}
await expect(element(by.id('BitcoinAddressQRCodeContainer'))).toBeVisible();
await expect(element(by.text('bc1qtc9zquvq7lgq87kzsgltvv4etwm9uxphfkvkay'))).toBeVisible();
await element(by.id('SetCustomAmountButton')).tap();
await element(by.id('BitcoinAmountInput')).typeText('1');
await element(by.id('CustomAmountDescription')).typeText('Test');
await element(by.id('CustomAmountSaveButton')).tap();
await expect(element(by.text('1 BTC'))).toBeVisible();
await expect(element(by.text('Test'))).toBeVisible();
await expect(element(by.id('BitcoinAddressQRCodeContainer'))).toBeVisible();
await expect(element(by.text('bitcoin:bc1qtc9zquvq7lgq87kzsgltvv4etwm9uxphfkvkay?amount=1&label=Test'))).toBeVisible();
await device.pressBack();
await element(by.id('SendButton')).tap();
await element(by.text('OK')).tap();