Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Sep 25, 2024
1 parent 18ae060 commit 0955c3f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/e2e-tests/tests/hard/bridge/Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,19 @@ test.describe('Bridge', () => {
await page.reload();
});
test('e2e', async ({ page, context }) => {
function log(message: string) {
test.info().annotations.push({ type: 'info', description: message });
}

log('Starting the test');
await test.step('Connect to Fuel', async () => {
await connectToFuel(page, fuelWalletTestHelper, [
'Account 2',
'Account 4',
]);
});

log('Connect to metamask');
await test.step('Connect to metamask', async () => {
await connectToMetamask(page);
});
Expand All @@ -92,6 +98,7 @@ test.describe('Bridge', () => {
});
const baseAssetId = fuelWallet.provider.getBaseAssetId();

log('Fuel wallet should be connected after refresh');
await test.step('Fuel wallet should be connected after refresh', async () => {
console.log('asd 1');
await goToBridgePage(page);
Expand Down Expand Up @@ -126,6 +133,7 @@ test.describe('Bridge', () => {
console.log('asd 6');
});

log('Deposit ETH to Fuel');
await test.step('Deposit ETH to Fuel', async () => {
const preDepositBalanceFuel = await fuelWallet.getBalance(baseAssetId);
const prevDepositBalanceEth = await client.getBalance({
Expand Down Expand Up @@ -201,6 +209,7 @@ test.describe('Bridge', () => {
});
});

log('Withdraw ETH from Fuel');
await test.step('Withdraw ETH from Fuel', async () => {
const preWithdrawBalanceFuel = await fuelWallet.getBalance(baseAssetId);
const prevWithdrawBalanceEth = await client.getBalance({
Expand Down Expand Up @@ -312,6 +321,7 @@ test.describe('Bridge', () => {
});
});

log('Faucet TKN');
await test.step('Faucet TKN', async () => {
const preFaucetBalance = (await erc20Contract.read.balanceOf([
account.address,
Expand Down Expand Up @@ -359,6 +369,7 @@ test.describe('Bridge', () => {
);
});

log('Deposit TKN to Fuel');
await test.step('Deposit TKN to Fuel', async () => {
await clickDepositTab(page);
const preDepositBalanceFuel =
Expand Down Expand Up @@ -470,6 +481,7 @@ test.describe('Bridge', () => {
});
});

log('Withdraw TKN from Fuel to ETH');
await test.step('Withdraw TKN from Fuel to ETH', async () => {
const preWithdrawBalanceFuel =
await fuelWallet.getBalance(FUEL_TokenAsset);
Expand Down Expand Up @@ -586,6 +598,7 @@ test.describe('Bridge', () => {
});
});

log('Transaction list should show correct after refresh the page');
await test.step('Transaction list should show correct after refresh the page', async () => {
await page.goto('/bridge');
await goToTransactionsPage(page);
Expand Down

0 comments on commit 0955c3f

Please sign in to comment.