Skip to content

Commit

Permalink
update createAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeesun Kim authored and Jeesun Kim committed Apr 23, 2024
1 parent 5df2ace commit 39d2aa2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/createAccountPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ test.describe("Create Account Page", () => {
}) => {
await page.getByRole("button", { name: "Generate keypair" }).click();

const getLumenButton = page
const fundButton = page
.getByTestId("fundAccount-button")
.getByText("Fund account with Friendbot");

await expect(getLumenButton).toBeEnabled();
await expect(fundButton).toBeEnabled();

// Mock the friendbot api call
await page.route(
"*/**/friendbot?addr=GA4X4QMSTEUKWAXXX3TBFRMGWI3O5X5IUUHPKAIH5XKNQ4IBTQ6YSVV3",
"*/**/?addr=GA4X4QMSTEUKWAXXX3TBFRMGWI3O5X5IUUHPKAIH5XKNQ4IBTQ6YSVV3",
async (route) => {
await route.fulfill({
status: 200,
Expand All @@ -58,7 +58,7 @@ test.describe("Create Account Page", () => {
response.url().includes("?addr=") && response.status() === 200,
);

await getLumenButton.click();
await fundButton.click();

// Wait for the mocked response
await responsePromise;
Expand Down

0 comments on commit 39d2aa2

Please sign in to comment.