Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Sep 8, 2024
1 parent aab8a81 commit 94702a8
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions packages/e2e-tests/tests/hard/bridge/Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,32 @@ test.describe('Bridge', () => {
});
const baseAssetId = fuelWallet.provider.getBaseAssetId();

await test.step('Fuel wallet should be connected after refresh', async () => {
await goToBridgePage(page);

const connectedWallet = getByAriaLabel(
page,
'Fuel Local: Connected Wallet',
);
const address = await connectedWallet.innerText();
const balance = getByAriaLabel(page, 'Balance');
const balanceText = await balance.innerText();

// refresh the page
await page.goto('/bridge');

const connectedWalletAferRefresh = getByAriaLabel(
page,
'Fuel Local: Connected Wallet',
);
const addressAfterRefresh = await connectedWalletAferRefresh.innerText();
const balanceAfterRefresh = getByAriaLabel(page, 'Balance');
const balanceTextAfterRefresh = await balanceAfterRefresh.innerText();

expect(addressAfterRefresh).toEqual(address);
expect(balanceTextAfterRefresh).toEqual(balanceText);
});

await test.step('Deposit ETH to Fuel', async () => {
const preDepositBalanceFuel = await fuelWallet.getBalance(baseAssetId);
const prevDepositBalanceEth = await client.getBalance({
Expand Down Expand Up @@ -558,32 +584,6 @@ test.describe('Bridge', () => {
await checkTxItemDone(page, withdrawERC20TxId);
});

await test.step('Fuel wallet should be connected after refresh', async () => {
await goToBridgePage(page);

const connectedWallet = getByAriaLabel(
page,
'Fuel Local: Connected Wallet',
);
const address = await connectedWallet.innerText();
const balance = getByAriaLabel(page, 'Balance');
const balanceText = await balance.innerText();

// refresh the page
await page.goto('/bridge');

const connectedWalletAferRefresh = getByAriaLabel(
page,
'Fuel Local: Connected Wallet',
);
const addressAfterRefresh = await connectedWalletAferRefresh.innerText();
const balanceAfterRefresh = getByAriaLabel(page, 'Balance: ');
const balanceTextAfterRefresh = await balanceAfterRefresh.innerText();

expect(addressAfterRefresh).toEqual(address);
expect(balanceTextAfterRefresh).toEqual(balanceText);
});

await test.step('Check if transaction list reacts correctly to fuel wallet changes', async () => {
await goToTransactionsPage(page);

Expand Down

0 comments on commit 94702a8

Please sign in to comment.