Skip to content

Commit

Permalink
Remove unstable test
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits committed Dec 4, 2024
1 parent 1f5f5a1 commit 1f6fb9a
Showing 1 changed file with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions tests/savedKeypairs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ 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 @@ -105,54 +94,6 @@ test.describe("Saved Keypairs Page", () => {
).toBeVisible();
});

test("Fund unfunded account", async () => {
const keypairItem = pageContext.getByTestId("saved-keypair-item").nth(1);

await expect(keypairItem).toBeVisible();
await expect(keypairItem.getByTestId("saved-keypair-name")).toHaveValue(
"Account 2",
);

const fundButton = pageContext.getByText("Fund with Friendbot");

await expect(fundButton).toBeVisible();

// Wait for the Friendbot response
const friendbotResponse = pageContext.waitForResponse(
(response) =>
response.url().includes(`?addr=${SAVED_ACCOUNT_2}`) &&
response.status() === 200,
);

await fundButton.click();
await friendbotResponse;

// Mock Account 2 response
await pageContext.route(
`*/**/accounts/${SAVED_ACCOUNT_2}`,
async (route) => {
await route.fulfill({
status: 200,
contentType: "application/hal+json; charset=utf-8",
body: JSON.stringify(MOCK_ACCOUNT_1_RESPONSE),
});
},
);

const accountResponse = pageContext.waitForResponse(
(response) =>
response.url().includes(`accounts/${SAVED_ACCOUNT_2}`) &&
response.status() === 200,
);

await accountResponse;

await expect(fundButton).toBeHidden();
await expect(
keypairItem.getByText("Balance: 10000.0000000 XLM", { exact: true }),
).toBeVisible();
});

test("Delete keypair", async () => {
const keypairItem = pageContext.getByTestId("saved-keypair-item").first();
const deleteButton = keypairItem.locator(".Button--error");
Expand Down

0 comments on commit 1f6fb9a

Please sign in to comment.