Skip to content

Commit

Permalink
Fix Friendbot test
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits committed Dec 4, 2024
1 parent 32ec3e0 commit f601dcc
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/savedKeypairs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit f601dcc

Please sign in to comment.