Skip to content

Commit

Permalink
Another try
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits committed Dec 4, 2024
1 parent f601dcc commit 2e100e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions tests/mock/localStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ export const SAVED_ACCOUNT_1 =
export const SAVED_ACCOUNT_1_SECRET =
"SADVGAH3VA3NGZ5VLX2ZICV7JQAINB2ZJZYOPMBXUNI3YRLGWLOA2OFY";
export const SAVED_ACCOUNT_2 =
"GD4F2N2OM2IM4MI6F6J5GVENQLNRVCYEE6XFN36MJOU5MOVFUYYSPBYG";
"GC5TQ7TXKHGE5JQMZPYV5KBSQ67X6PYQVU5QN7JRGWCHRA227UFPZ6LD";
export const SAVED_ACCOUNT_2_SECRET =
"SDVMTXXSUJG6GKFCETCKFV6FCGE7C5FYKBCV4AMD4N3SRYCDSA53KEG4";
"SCPPMMBZBQGTGQKIPGFJDOHOPGK7SXZJGMYF76PFHF2PBLY2RWGZNSVV";

const SAVED_ACCOUNTS = [
{
Expand Down
22 changes: 11 additions & 11 deletions tests/savedKeypairs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ test.describe("Saved Keypairs Page", () => {
});
},
);

// Account 2 Friendbot response
await pageContext.route(
`https://friendbot.stellar.org/?addr=${SAVED_ACCOUNT_2}`,
async (route) => {
await route.fulfill({
status: 200,
contentType: "application/hal+json; charset=utf-8",
});
},
);
});

test("Loads", async () => {
Expand Down Expand Up @@ -106,16 +117,6 @@ 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(friendbotUrl, async (route) => {
await route.fulfill({
status: 200,
contentType: "application/hal+json; charset=utf-8",
});
});

// Wait for the Friendbot response
const friendbotResponse = pageContext.waitForResponse(
(response) =>
Expand All @@ -125,7 +126,6 @@ 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 2e100e2

Please sign in to comment.