Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Nov 21, 2024
1 parent f4f7bce commit 21e4f8d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions test/e2e/tests/settings/account-token-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,12 @@ describe('Settings', function () {
await driver.delay(1000);
assert.equal(await tokenListAmount.getText(), '25\nETH');

// switch to Sepolia
// the account list item used to always show account.balance as long as its EVM network.
// Now we are showing aggregated fiat balance on non testnetworks; but if it is a testnetwork we will show account.balance.
// The current test was running initially on localhost
// which is not a testnetwork resulting in the code trying to calculate the aggregated total fiat balance which shows 0.00$
// If this test switches to mainnet then switches back to localhost; the test will pass because switching to mainnet
// will make the code calculate the aggregate fiat balance on mainnet+Linea mainnet and because this account in this test
// has 42,500.00 native Eth on mainnet then the aggregated total fiat would be 42,500.00. When the user switches back to localhost
// it will show the total that the test is expecting.

// I think we can slightly modify this test to switch to Sepolia network before checking the account List item value
await switchToNetworkFlow(driver, 'Sepolia');

await driver.clickElement('[data-testid="account-menu-icon"]');
const accountTokenValue = await driver.waitForSelector(
'.multichain-account-list-item .multichain-account-list-item__asset',
);

assert.equal(await accountTokenValue.getText(), '25SepoliaETH');
assert.equal(await accountTokenValue.getText(), '25ETH');
},
);
});
Expand Down

0 comments on commit 21e4f8d

Please sign in to comment.