Skip to content

Commit

Permalink
Merge branch 'develop' into jl/fix-queued-request-controller-add-swit…
Browse files Browse the repository at this point in the history
…ch-chain
  • Loading branch information
jiexi authored Oct 30, 2024
2 parents 7a85b89 + 5227d6f commit f8ca8b5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions test/e2e/flask/btc/btc-account-overview.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { strict as assert } from 'assert';
import { Suite } from 'mocha';
import { DEFAULT_BTC_BALANCE } from '../../constants';
import { withBtcAccountSnap } from './common-btc';
Expand Down Expand Up @@ -46,17 +45,19 @@ describe('BTC Account - Overview', function (this: Suite) {
await withBtcAccountSnap(
{ title: this.test?.fullTitle() },
async (driver) => {
// Wait for the balance to load up
await driver.delay(2000);

const balanceElement = await driver.findElement(
'.coin-overview__balance',
);
const balanceText = await balanceElement.getText();
await driver.waitForSelector({
testId: 'account-value-and-suffix',
text: `${DEFAULT_BTC_BALANCE}`,
});
await driver.waitForSelector({
css: '.currency-display-component__suffix',
text: 'BTC',
});

const [balance, unit] = balanceText.split('\n');
assert(Number(balance) === DEFAULT_BTC_BALANCE);
assert(unit === 'BTC');
await driver.waitForSelector({
tag: 'p',
text: `${DEFAULT_BTC_BALANCE} BTC`,
});
},
);
});
Expand Down

0 comments on commit f8ca8b5

Please sign in to comment.