diff --git a/e2e/backup.e2e.js b/e2e/backup.e2e.js index ffdd7a93a..f0b694cf2 100644 --- a/e2e/backup.e2e.js +++ b/e2e/backup.e2e.js @@ -82,7 +82,7 @@ d('Backup', () => { await element(by.id('TagInput')).replaceText(tag); await element(by.id('TagInput')).tapReturnKey(); await sleep(200); // animation - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); // change currency to GBP await element(by.id('TotalBalance')).tap(); // switch to local currency diff --git a/e2e/numberpad.e2e.js b/e2e/numberpad.e2e.js index dc406ffad..9275d002b 100644 --- a/e2e/numberpad.e2e.js +++ b/e2e/numberpad.e2e.js @@ -89,7 +89,7 @@ d('NumberPad', () => { await element(by.id('GeneralSettings')).tap(); await element(by.id('UnitSettings')).tap(); await element(by.id('DenominationClassic')).tap(); - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); await element(by.id('Receive')).tap(); await element(by.id('SpecifyInvoiceButton')).tap(); diff --git a/e2e/security.e2e.js b/e2e/security.e2e.js index f5a7cd8ce..5d4dd38f9 100644 --- a/e2e/security.e2e.js +++ b/e2e/security.e2e.js @@ -1,4 +1,5 @@ import BitcoinJsonRpc from 'bitcoin-json-rpc'; +import { device } from 'detox'; import { sleep, @@ -68,6 +69,11 @@ d('Settings Security And Privacy', () => { return; } + // skip test on Android we don't support bitometrics there + if (device.getPlatform() === 'android') { + return; + } + await device.setBiometricEnrollment(true); await element(by.id('Settings')).tap(); diff --git a/e2e/settings.e2e.js b/e2e/settings.e2e.js index f47d29b96..39a749a17 100644 --- a/e2e/settings.e2e.js +++ b/e2e/settings.e2e.js @@ -71,6 +71,12 @@ d('Settings', () => { // switch back to sats await element(by.id('TotalBalance')).tap(); + // switch to USD + await element(by.id('Settings')).tap(); + await element(by.id('GeneralSettings')).tap(); + await element(by.id('CurrenciesSettings')).tap(); + await element(by.text('USD ($)')).tap(); + markComplete('settings-currency'); }); @@ -94,13 +100,13 @@ d('Settings', () => { // check default unit await expect(unitRow).toHaveText('Bitcoin'); - // switch to GBP + // switch to USD await element(by.id('UnitSettings')).tap(); - await element(by.id('GBP')).tap(); - await element(by.id('NavigationBack')).tap(); - await expect(unitRow).toHaveText('GBP'); - await element(by.id('NavigationClose')).tap(); - await expect(fiatSymbol).toHaveText('£'); + await element(by.id('USD')).tap(); + await element(by.id('NavigationBack')).atIndex(0).tap(); + await expect(unitRow).toHaveText('USD'); + await element(by.id('NavigationClose')).atIndex(0).tap(); + await expect(fiatSymbol).toHaveText('$'); await expect(balance).toHaveText('0.00'); // switch back to BTC @@ -108,9 +114,9 @@ d('Settings', () => { await element(by.id('GeneralSettings')).tap(); await element(by.id('UnitSettings')).tap(); await element(by.id('Bitcoin')).tap(); - await element(by.id('NavigationBack')).tap(); + await element(by.id('NavigationBack')).atIndex(0).tap(); await expect(unitRow).toHaveText('Bitcoin'); - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); await expect(balance).toHaveText('0'); // switch to classic denomination @@ -118,9 +124,9 @@ d('Settings', () => { await element(by.id('GeneralSettings')).tap(); await element(by.id('UnitSettings')).tap(); await element(by.id('DenominationClassic')).tap(); - await element(by.id('NavigationBack')).tap(); + await element(by.id('NavigationBack')).atIndex(0).tap(); await expect(unitRow).toHaveText('Bitcoin'); - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); await expect(balance).toHaveText('0.00000000'); markComplete('settings-unit'); @@ -239,7 +245,7 @@ d('Settings', () => { await element(by.id('Settings')).tap(); await element(by.id('SecuritySettings')).tap(); await element(by.id('SwipeBalanceToHide')).tap(); - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); // Balance should be visible await expect(element(by.id('ShowBalance'))).not.toBeVisible(); @@ -410,7 +416,7 @@ d('Settings', () => { await waitFor(element(by.id('NavigationBack')).atIndex(0)) .toBeVisible() .withTimeout(5000); - await element(by.id('NavigationBack')).tap(); + await element(by.id('NavigationBack')).atIndex(0).tap(); await element(by.id('LightningNodeInfo')).tap(); // TODO: this fails too often on CI @@ -666,7 +672,7 @@ d('Settings', () => { await expect(element(by.id('Status-lightning_connection'))).toBeVisible(); await expect(element(by.id('Status-full_backup'))).toBeVisible(); - await element(by.id('NavigationClose')).tap(); + await element(by.id('NavigationClose')).atIndex(0).tap(); markComplete('settings-support-status'); });