Skip to content

Commit 799967c

Browse files
committed
fix(test): add racing condition to wait asset-opt out render before testing
1 parent 669d16f commit 799967c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/features/transaction-wizard/utils/transactions-url-search-params.test.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ describe('Render transactions page with search params', () => {
817817
}),
818818
})
819819

820-
expect(await screen.findByText(assetId)).toBeInTheDocument()
820+
expect(await screen.findByText(assetId, {}, { timeout: 3000 })).toBeInTheDocument()
821821
expect(await screen.findByText(closeto)).toBeInTheDocument()
822822
// Find the yellow sender link (auto-populated)
823823
const senderLinks = await screen.findAllByText(localnetDispenderAccount.addr.toString())
@@ -1042,7 +1042,7 @@ describe('Render transactions page with search params', () => {
10421042
})
10431043

10441044
await screen.findByText(receiver, {}, { timeout: 3000 })
1045-
1045+
10461046
expect(await screen.findByText(receiver)).toBeInTheDocument()
10471047
expect(await screen.findByText(assetId)).toBeInTheDocument()
10481048
expect(await screen.findByText(amount)).toBeInTheDocument()
@@ -1493,9 +1493,8 @@ describe('Render transactions page with search params', () => {
14931493
}),
14941494
})
14951495

1496-
14971496
await screen.findByText(assetId, {}, { timeout: 3000 })
1498-
1497+
14991498
expect(await screen.findByText(assetId)).toBeInTheDocument()
15001499
// Find the yellow sender link (auto-populated)
15011500
const senderLinks = await screen.findAllByText(localnetDispenderAccount.addr.toString())

0 commit comments

Comments
 (0)