From 9b20738f402e0a6849612a2a85598f7826edf88d Mon Sep 17 00:00:00 2001 From: dariovp Date: Thu, 26 Sep 2024 20:55:10 -0300 Subject: [PATCH] fix: capitalization of testID in new_wallet test --- e2e/new_wallet.test.js | 52 ++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/e2e/new_wallet.test.js b/e2e/new_wallet.test.js index 97a32e30a..b2875b20a 100644 --- a/e2e/new_wallet.test.js +++ b/e2e/new_wallet.test.js @@ -1,40 +1,62 @@ const { log, device, by, element } = require('detox'); -const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); +const sleep = ms => new Promise(r => setTimeout(r, ms)); describe('New Wallet', () => { it('New wallet creation flow works.', async () => { //await sleep(5000); // go to setting modal screen - await waitFor(element(by.id('header.drawmenu'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('header.drawmenu'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('header.drawmenu')).tap(); - await waitFor(element(by.id('menu.settings'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('menu.settings'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('menu.settings')).tap(); // first we need to change the App to advanced mode - await waitFor(element(by.id('settings.mode-advanced'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('settings.mode-advanced'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('settings.mode-advanced')).tap(); - await waitFor(element(by.id('settings.button.save'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('settings.button.save'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('settings.button.save')).tap(); // change to another wallet -> new wallet - await waitFor(element(by.id('header.drawmenu'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('header.drawmenu'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('header.drawmenu')).tap(); - await waitFor(element(by.id('menu.changewallet'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('menu.changewallet'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('menu.changewallet')).tap(); - await waitFor(element(by.id('seed.button.ok'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('seed.button.ok'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('seed.button.ok')).tap(); - await waitFor(element(by.text('CONFIRM'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.text('CONFIRM'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.text('CONFIRM')).tap(); - await waitFor(element(by.id('loadingapp.createnewwallet'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('loadingapp.createnewwallet'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('loadingapp.createnewwallet')).tap(); - await waitFor(element(by.id('seed.button.ok'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('seed.button.ok'))) + .toBeVisible() + .withTimeout(sync_timeout); await element(by.id('seed.button.ok')).tap(); - await waitFor(element(by.id('ValueTransfer text'))).toBeVisible().withTimeout(sync_timeout); - let text = element(by.id('ValueTransfer text')); + await waitFor(element(by.id('valuetransfer text'))) + .toBeVisible() + .withTimeout(sync_timeout); + let text = element(by.id('valuetransfer text')); let attributes = await text.getAttributes(); log.info(attributes); log.info('Value:', attributes.value); @@ -46,6 +68,8 @@ describe('New Wallet', () => { await expect(text).toHaveText('History'); // waiting new wallet fully synced - await waitFor(element(by.id('header.checkicon'))).toBeVisible().withTimeout(sync_timeout); + await waitFor(element(by.id('header.checkicon'))) + .toBeVisible() + .withTimeout(sync_timeout); }); });