diff --git a/tests/savedKeypairs.test.ts b/tests/savedKeypairs.test.ts index 38675823..ebda9904 100644 --- a/tests/savedKeypairs.test.ts +++ b/tests/savedKeypairs.test.ts @@ -106,16 +106,15 @@ test.describe("Saved Keypairs Page", () => { await expect(fundButton).toBeVisible(); + const friendbotUrl = `https://friendbot.stellar.org/?addr=${SAVED_ACCOUNT_2}`; + // Mock fund account - await pageContext.route( - `*/**/?addr=${SAVED_ACCOUNT_2}`, - async (route) => { - await route.fulfill({ - status: 200, - contentType: "application/hal+json; charset=utf-8", - }); - }, - ); + await pageContext.route(friendbotUrl, async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/hal+json; charset=utf-8", + }); + }); // Wait for the Friendbot response const friendbotResponse = pageContext.waitForResponse( @@ -125,8 +124,8 @@ test.describe("Saved Keypairs Page", () => { ); await fundButton.click(); - await friendbotResponse; + await pageContext.unroute(friendbotUrl); // Mock Account 2 response await pageContext.route(