Skip to content

Commit d572107

Browse files
authored
fix: mint asset assertion (#1857)
1 parent 93e1121 commit d572107

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { FuelWalletTestHelper } from '@fuels/playwright-utils';
22
import {
33
expectButtonToBeEnabled,
44
getButtonByText,
5+
getByAriaLabel,
56
hasText,
67
} from '@fuels/playwright-utils';
78
import { expect } from '@playwright/test';
@@ -156,7 +157,18 @@ test.describe('Mint Assets', () => {
156157
await hasText(walletNotificationPage, name);
157158
await hasText(walletNotificationPage, shortAddress(assetId), 0, 10000);
158159
// test mint amount is correct
159-
await hasText(walletNotificationPage, `1.2345 ${symbol}`);
160+
expect
161+
.poll(
162+
async () => {
163+
const amountContainer = getByAriaLabel(
164+
walletNotificationPage,
165+
'amount-container'
166+
);
167+
return (await amountContainer.innerText()).replace('\n', ' ');
168+
},
169+
{ timeout: 10000 }
170+
)
171+
.toBe(`1.2345 ${symbol}`);
160172

161173
// test gas fee is shown and correct
162174
await hasText(walletNotificationPage, 'Fee (network)');

0 commit comments

Comments
 (0)