diff --git a/suite-native/app/e2e/jest.setup.ts b/suite-native/app/e2e/jest.setup.ts index 35a9a0413d6..527a3aaa8df 100644 --- a/suite-native/app/e2e/jest.setup.ts +++ b/suite-native/app/e2e/jest.setup.ts @@ -1 +1 @@ -jest.retryTimes(2); +jest.retryTimes(2, { logErrorsBeforeRetry: true }); diff --git a/suite-native/app/e2e/tests/accountsImport.test.ts b/suite-native/app/e2e/tests/accountsImport.test.ts deleted file mode 100644 index b3701a49837..00000000000 --- a/suite-native/app/e2e/tests/accountsImport.test.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { appIsFullyLoaded, openApp, restartApp } from '../utils'; -import { xpubs } from '../fixtures/xpubs'; -import { onAccountImport } from '../pageObjects/accountImportActions'; -import { onMyAssets } from '../pageObjects/myAssetsActions'; -import { onOnboarding } from '../pageObjects/onboardingActions'; -import { onHome } from '../pageObjects/homeActions'; -import { onTabBar } from '../pageObjects/tabBarActions'; - -describe('Import all possible accounts in watch only mode.', () => { - beforeAll(async () => { - await openApp({ newInstance: true }); - await onOnboarding.finishOnboarding(); - }); - - beforeEach(async () => { - await restartApp(); - await appIsFullyLoaded(); - }); - - it('Import BTC SegWit account', async () => { - await onHome.tapSyncCoinsButton(); - await onAccountImport.importAccount({ - networkSymbol: 'btc', - xpub: xpubs.btc.segwit, - accountName: 'BTC SegWit', - }); - }); - - it('Import BTC Legacy SegWit account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'btc', - xpub: xpubs.btc.legacySegwit, - accountName: 'BTC Legacy SegWit', - }); - }); - - it('Import BTC Taproot account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'btc', - xpub: xpubs.btc.taproot, - accountName: 'BTC Taproot', - }); - }); - - it('Import BTC Legacy account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'btc', - xpub: xpubs.btc.legacy, - accountName: 'BTC Legacy', - }); - }); - - it('Import LTC account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'ltc', - xpub: xpubs.ltc, - accountName: 'Litecoin SegWit', - }); - }); - - it('Import Cardano account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'ada', - xpub: xpubs.ada, - accountName: 'Cardano #1', - }); - }); - - it('Import DOGE account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'doge', - xpub: xpubs.doge, - accountName: 'Dogecoin #1', - }); - }); - - it('Import ZCash account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'zec', - xpub: xpubs.zec, - accountName: 'Zcash #1', - }); - }); - - it('Import XRP account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'xrp', - xpub: xpubs.xrp, - accountName: 'Ripple #1', - }); - }); - - it('Import ETH account', async () => { - await onTabBar.navigateToMyAssets(); - await onMyAssets.addAccount(); - await onAccountImport.importAccount({ - networkSymbol: 'eth', - xpub: xpubs.eth, - accountName: 'Ethereum #1', - }); - }); -}); diff --git a/suite-native/app/e2e/tests/bitcoinAccountsImport.test.ts b/suite-native/app/e2e/tests/bitcoinAccountsImport.test.ts new file mode 100644 index 00000000000..95b813af3b0 --- /dev/null +++ b/suite-native/app/e2e/tests/bitcoinAccountsImport.test.ts @@ -0,0 +1,50 @@ +import { openApp } from '../utils'; +import { xpubs } from '../fixtures/xpubs'; +import { onAccountImport } from '../pageObjects/accountImportActions'; +import { onMyAssets } from '../pageObjects/myAssetsActions'; +import { onOnboarding } from '../pageObjects/onboardingActions'; +import { onTabBar } from '../pageObjects/tabBarActions'; + +describe('Import Bitcoin network accounts.', () => { + beforeAll(async () => { + await openApp({ newInstance: true }); + await onOnboarding.finishOnboarding(); + await onTabBar.navigateToMyAssets(); + }); + + beforeEach(async () => { + await onMyAssets.addAccount(); + }); + + it('Import BTC SegWit account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'btc', + xpub: xpubs.btc.segwit, + accountName: 'BTC SegWit', + }); + }); + + it('Import BTC Legacy SegWit account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'btc', + xpub: xpubs.btc.legacySegwit, + accountName: 'BTC Legacy SegWit', + }); + }); + + it('Import BTC Taproot account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'btc', + xpub: xpubs.btc.taproot, + accountName: 'BTC Taproot', + }); + }); + + it('Import BTC Legacy account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'btc', + xpub: xpubs.btc.legacy, + accountName: 'BTC Legacy', + }); + }); +}); diff --git a/suite-native/app/e2e/tests/othersAccountsImport.test.ts b/suite-native/app/e2e/tests/othersAccountsImport.test.ts new file mode 100644 index 00000000000..407f48e562e --- /dev/null +++ b/suite-native/app/e2e/tests/othersAccountsImport.test.ts @@ -0,0 +1,65 @@ +import { openApp } from '../utils'; +import { xpubs } from '../fixtures/xpubs'; +import { onAccountImport } from '../pageObjects/accountImportActions'; +import { onMyAssets } from '../pageObjects/myAssetsActions'; +import { onOnboarding } from '../pageObjects/onboardingActions'; +import { onTabBar } from '../pageObjects/tabBarActions'; + +describe('Import accounts of other networks.', () => { + beforeAll(async () => { + await openApp({ newInstance: true }); + await onOnboarding.finishOnboarding(); + await onTabBar.navigateToMyAssets(); + }); + + beforeEach(async () => { + await onMyAssets.addAccount(); + }); + + it('Import LTC account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'ltc', + xpub: xpubs.ltc, + accountName: 'Litecoin SegWit', + }); + }); + + it('Import ZCash account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'zec', + xpub: xpubs.zec, + accountName: 'Zcash #1', + }); + }); + + it('Import DOGE account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'doge', + xpub: xpubs.doge, + accountName: 'Dogecoin #1', + }); + }); + + it('Import Cardano account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'ada', + xpub: xpubs.ada, + accountName: 'Cardano #1', + }); + }); + it('Import XRP account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'xrp', + xpub: xpubs.xrp, + accountName: 'Ripple #1', + }); + }); + + it('Import ETH account', async () => { + await onAccountImport.importAccount({ + networkSymbol: 'eth', + xpub: xpubs.eth, + accountName: 'Ethereum #1', + }); + }); +}); diff --git a/suite-native/app/e2e/utils.ts b/suite-native/app/e2e/utils.ts index fc7c5809975..347b9367881 100644 --- a/suite-native/app/e2e/utils.ts +++ b/suite-native/app/e2e/utils.ts @@ -86,5 +86,5 @@ export const scrollUntilVisible = async (matcher: Detox.NativeMatcher) => { export const appIsFullyLoaded = async () => { await waitFor(element(by.id('@screen/mainScrollView'))) .toBeVisible() - .withTimeout(20000); + .withTimeout(35000); };