From 769d5d39bc7a71b069b8c516189ecea80c15e270 Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 26 Dec 2024 12:06:59 +0300 Subject: [PATCH 1/4] move test from the blacklist --- .../25_hideShowBalance.test.js | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) rename packages/e2e-tests/test/{blacklist => }/25_hideShowBalance.test.js (81%) diff --git a/packages/e2e-tests/test/blacklist/25_hideShowBalance.test.js b/packages/e2e-tests/test/25_hideShowBalance.test.js similarity index 81% rename from packages/e2e-tests/test/blacklist/25_hideShowBalance.test.js rename to packages/e2e-tests/test/25_hideShowBalance.test.js index f30f069055..17f981fb37 100644 --- a/packages/e2e-tests/test/blacklist/25_hideShowBalance.test.js +++ b/packages/e2e-tests/test/25_hideShowBalance.test.js @@ -1,23 +1,22 @@ -import BasePage from '../../pages/basepage.js'; -import { customAfterEach } from '../../utils/customHooks.js'; -import TransactionsSubTab from '../../pages/wallet/walletTab/walletTransactions.page.js'; -import ReceiveSubTab from '../../pages/wallet/walletTab/receiveSubTab.page.js'; +import BasePage from '../pages/basepage.js'; +import { customAfterEach } from '../utils/customHooks.js'; +import TransactionsSubTab from '../pages/wallet/walletTab/walletTransactions.page.js'; +import ReceiveSubTab from '../pages/wallet/walletTab/receiveSubTab.page.js'; import { expect } from 'chai'; -import { getTestLogger } from '../../utils/utils.js'; -import { oneMinute } from '../../helpers/timeConstants.js'; -import driversPoolsManager from '../../utils/driversPool.js'; -import { prepareWallet } from '../../helpers/restoreWalletHelper.js'; -import { testWallet1 } from '../../utils/testWallets.js'; +import { getTestLogger } from '../utils/utils.js'; +import { oneMinute } from '../helpers/timeConstants.js'; +import driversPoolsManager from '../utils/driversPool.js'; +import { prepareWallet } from '../helpers/restoreWalletHelper.js'; +import { testWallet1 } from '../utils/testWallets.js'; -// Issue https://emurgo.atlassian.net/browse/YOEXT-1218 describe('Hide and show balance', function () { this.timeout(2 * oneMinute); let webdriver = null; let logger = null; before(async function () { - webdriver = await driversPoolsManager.getDriverFromPool(); logger = getTestLogger(this.test.parent.title); + webdriver = await driversPoolsManager.getDriverFromPool(); await prepareWallet(webdriver, logger, 'testWallet1', this); }); // check the default state. The balance should be displayed @@ -57,9 +56,6 @@ describe('Hide and show balance', function () { await receivePage.selectBaseExtHasBalanceAddrs(); const balanceExtAddrHidden = await receivePage.allAddressesBalancesHidden(); expect(balanceExtAddrHidden, 'Balances of external addresses are not hidden').to.be.true; - await receivePage.selectBaseInterHasBalanceAddrs(); - const balanceInterAddrHidden = await receivePage.allAddressesBalancesHidden(); - expect(balanceInterAddrHidden, 'Balances of internal addresses are not hidden').to.be.true; }); // add checking Staking page when testnetwork is added // click show balance @@ -96,9 +92,6 @@ describe('Hide and show balance', function () { await receivePage.selectBaseExtHasBalanceAddrs(); const balanceExtAddrHidden = await receivePage.allAddressesBalancesHidden(); expect(balanceExtAddrHidden, 'Balances of external addresses are hidden').to.be.false; - await receivePage.selectBaseInterHasBalanceAddrs(); - const balanceInterAddrHidden = await receivePage.allAddressesBalancesHidden(); - expect(balanceInterAddrHidden, 'Balances of internal addresses are hidden').to.be.false; }); // add checking Staking page when testnetwork is added From 9a733e134fd4929fb6c13d833ab71b9567de2c9b Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 26 Dec 2024 12:07:18 +0300 Subject: [PATCH 2/4] added missed id --- .../app/components/topbar/NavWalletDetailsRevamp.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js b/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js index 3ba5bda8c4..de2884bad5 100644 --- a/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js +++ b/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js @@ -157,6 +157,7 @@ export default class NavWalletDetailsRevamp extends Component { backgroundColor: 'ds.primary_500', }} color="primary" + id={amountDisplayId + "-showHideBalance-button"} > {shouldHideBalance ? ( From d80012ae83d76d15534598981c1f4e9651efbc6d Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 26 Dec 2024 12:07:29 +0300 Subject: [PATCH 3/4] minor fix --- packages/e2e-tests/pages/walletCommonBase.page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-tests/pages/walletCommonBase.page.js b/packages/e2e-tests/pages/walletCommonBase.page.js index 1f5b050724..a0d40746b1 100644 --- a/packages/e2e-tests/pages/walletCommonBase.page.js +++ b/packages/e2e-tests/pages/walletCommonBase.page.js @@ -326,7 +326,7 @@ class WalletCommonBase extends BasePage { this.walletBalanceTextLocator, async () => { const rawBalanceText = await this.getText(this.walletBalanceTextLocator); - const balanceStr = rawBalanceText.split(' ')[0]; + const balanceStr = rawBalanceText.split(' ')[0].trim(); return balanceStr === balanceReplacer; } ); @@ -335,7 +335,7 @@ class WalletCommonBase extends BasePage { this.walletFiatBalanceTextLocator, async () => { const rawFiatBalanceText = await this.getText(this.walletFiatBalanceTextLocator); - const fiatBalanceStr = rawFiatBalanceText.split(' ')[0]; + const fiatBalanceStr = rawFiatBalanceText.split(' ')[0].trim(); return fiatBalanceStr === balanceReplacer; } ); From 97a3ba187ed0f57b886bbe581614009e6d0c91fc Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 26 Dec 2024 12:33:44 +0300 Subject: [PATCH 4/4] lint fix --- .../app/components/topbar/NavWalletDetailsRevamp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js b/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js index de2884bad5..7ac7c7bbbe 100644 --- a/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js +++ b/packages/yoroi-extension/app/components/topbar/NavWalletDetailsRevamp.js @@ -157,7 +157,7 @@ export default class NavWalletDetailsRevamp extends Component { backgroundColor: 'ds.primary_500', }} color="primary" - id={amountDisplayId + "-showHideBalance-button"} + id={amountDisplayId + '-showHideBalance-button'} > {shouldHideBalance ? (