-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature/memory security improvement 5.27.2 (#1827) * add temporary store extra data * add tests for switching accounts * reset session length * upgrade jest and add unit tests * rm unused selectors * fix sendpayment test * rm npm package and add unit tests * add better error handling and Sentry capture * rm console.log * make sure to login before adding new stellar address * add a test for imported S key payment * Fix/import acct when timed out (#1832) * make sure to login to all accounts before importing by private key if session has timed out * update comment * login before showing mnemonic phrase (#1834) * login before showing mnemonic phrase * add more Sentry error capture
- Loading branch information
Showing
18 changed files
with
1,435 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { expect, expectPageToHaveScreenshot } from "../test-fixtures"; | ||
|
||
export const sendXlmPayment = async ({ page }) => { | ||
await page.getByTitle("Send Payment").click({ force: true }); | ||
|
||
await expect(page.getByText("Send To")).toBeVisible(); | ||
await expectPageToHaveScreenshot({ | ||
page, | ||
screenshot: "send-payment-to.png", | ||
}); | ||
await page | ||
.getByTestId("send-to-input") | ||
.fill("GBTYAFHGNZSTE4VBWZYAGB3SRGJEPTI5I4Y22KZ4JTVAN56LESB6JZOF"); | ||
await page.getByText("Continue").click({ force: true }); | ||
|
||
await expect(page.getByText("Send XLM")).toBeVisible(); | ||
await expectPageToHaveScreenshot({ | ||
page, | ||
screenshot: "send-payment-amount.png", | ||
}); | ||
await page.getByTestId("send-amount-amount-input").fill("1"); | ||
await page.getByText("Continue").click({ force: true }); | ||
|
||
await expect(page.getByText("Send Settings")).toBeVisible(); | ||
await expect(page.getByTestId("SendSettingsTransactionFee")).toHaveText( | ||
/[0-9]/, | ||
); | ||
// 100 XLM is the default, so likely a sign the fee was not set properly from Horizon | ||
await expect( | ||
page.getByTestId("SendSettingsTransactionFee"), | ||
).not.toContainText("100 XLM"); | ||
await expectPageToHaveScreenshot( | ||
{ | ||
page, | ||
screenshot: "send-payment-settings.png", | ||
}, | ||
{ | ||
mask: [page.locator("[data-testid='SendSettingsTransactionFee']")], | ||
}, | ||
); | ||
await page.getByText("Review Send").click({ force: true }); | ||
|
||
await expect(page.getByText("Confirm Send")).toBeVisible(); | ||
await expect(page.getByText("XDR")).toBeVisible(); | ||
await expectPageToHaveScreenshot({ | ||
page, | ||
screenshot: "send-payment-confirm.png", | ||
}); | ||
await page.getByTestId("transaction-details-btn-send").click({ force: true }); | ||
|
||
await expect(page.getByText("Successfully sent")).toBeVisible({ | ||
timeout: 60000, | ||
}); | ||
await expectPageToHaveScreenshot({ | ||
page, | ||
screenshot: "send-payment-sent.png", | ||
}); | ||
|
||
await page.getByText("Details").click({ force: true }); | ||
await expectPageToHaveScreenshot({ | ||
page, | ||
screenshot: "send-payment-details.png", | ||
}); | ||
await expect(page.getByText("Sent XLM")).toBeVisible(); | ||
await expect(page.getByTestId("asset-amount")).toContainText("1"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.