Skip to content

Commit

Permalink
Merge branch 'develop' into ruslan/delete-unused-files
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman authored Jan 7, 2025
2 parents d3820dc + e266935 commit ea30b1d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
4 changes: 2 additions & 2 deletions packages/e2e-tests/pages/walletCommonBase.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
);
Expand All @@ -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;
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default class NavWalletDetailsRevamp extends Component<Props> {
backgroundColor: 'ds.primary_500',
}}
color="primary"
id={amountDisplayId + '-showHideBalance-button'}
>
{shouldHideBalance ? (
<IconWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default class NavBarContainerRevamp extends Component<{| ...StoresProps,
const { stores, pageBanner, isErrorPage } = this.props;
const { profile, wallets } = stores;
const { selected, selectedWalletName } = wallets;
const shouldHideBalance = profile.shouldHideBalance;

const DropdownHead = () => {
if (!selected || !selectedWalletName) {
Expand All @@ -86,7 +87,7 @@ export default class NavBarContainerRevamp extends Component<{| ...StoresProps,
plate={plate}
name={selectedWalletName}
onUpdateHideBalance={this.updateHideBalance}
shouldHideBalance={profile.shouldHideBalance}
shouldHideBalance={shouldHideBalance}
rewards={rewards}
walletAmount={selected.balance}
getTokenInfo={genLookupOrFail(this.props.stores.tokenInfoStore.tokenInfo)}
Expand Down Expand Up @@ -123,6 +124,7 @@ export default class NavBarContainerRevamp extends Component<{| ...StoresProps,
const { stores } = this.props;
const { selected, wallets } = stores.wallets;
const getTokenInfo = genLookupOrFail(stores.tokenInfoStore.tokenInfo);
const shouldHideBalance = stores.profile.shouldHideBalance;

if (stores.uiDialogs.isOpen(WalletListDialog)) {
const cardanoWallets = [];
Expand Down Expand Up @@ -156,7 +158,7 @@ export default class NavBarContainerRevamp extends Component<{| ...StoresProps,
this.checkAndResetGovRoutes();
this.props.stores.uiDialogs.closeActiveDialog();
}}
shouldHideBalance={stores.profile.shouldHideBalance}
shouldHideBalance={shouldHideBalance}
onUpdateHideBalance={this.updateHideBalance}
getTokenInfo={getTokenInfo}
walletAmount={selected?.balance}
Expand Down

0 comments on commit ea30b1d

Please sign in to comment.