mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-04-28 12:45:30 +08:00
refactor: kill old send form and tests
This commit is contained in:
@@ -3,17 +3,11 @@ import { TEST_ACCOUNT_1_BTC_ADDRESS, TEST_ACCOUNT_1_STX_ADDRESS } from '@tests/m
|
||||
import { test } from '../../fixtures/fixtures';
|
||||
|
||||
test.describe('onboarding existing user', () => {
|
||||
// TODO: Remove with mainnet bitcoin
|
||||
test.beforeEach(async () => {
|
||||
test.skip();
|
||||
test.beforeEach(async ({ extensionId, globalPage, onboardingPage }) => {
|
||||
await globalPage.setupAndUseApiCalls(extensionId);
|
||||
await onboardingPage.signInExistingUser();
|
||||
});
|
||||
|
||||
// TODO: Use with mainnet bitcoin
|
||||
// test.beforeEach(async ({ extensionId, globalPage, onboardingPage }) => {
|
||||
// await globalPage.setupAndUseApiCalls(extensionId);
|
||||
// await onboardingPage.signInExistingUser();
|
||||
// });
|
||||
|
||||
test('restoring a wallet generates the correct bitcoin segwit address', async ({ homePage }) => {
|
||||
const testAddress = await homePage.getReceiveBtcAddress();
|
||||
test.expect(testAddress).toEqual(TEST_ACCOUNT_1_BTC_ADDRESS);
|
||||
|
||||
@@ -4,20 +4,15 @@ import { SendCryptoAssetSelectors } from '@tests/selectors/send.selectors';
|
||||
import { test } from '../../fixtures/fixtures';
|
||||
|
||||
test.describe('send btc', () => {
|
||||
// TODO: Remove with legacy send form
|
||||
test.beforeEach(async () => {
|
||||
test.skip();
|
||||
// TODO: Don't run these if we disable bitcoin sending
|
||||
test.beforeEach(async ({ extensionId, globalPage, homePage, onboardingPage, sendPage }) => {
|
||||
await globalPage.setupAndUseApiCalls(extensionId);
|
||||
await onboardingPage.signInExistingUser();
|
||||
|
||||
await homePage.sendButton.click();
|
||||
await sendPage.selectBtcAndGoToSendForm();
|
||||
});
|
||||
|
||||
// TODO: Use with mainnet bitcoin
|
||||
// test.beforeEach(async ({ extensionId, globalPage, homePage, onboardingPage, sendPage }) => {
|
||||
// await globalPage.setupAndUseApiCalls(extensionId);
|
||||
// await onboardingPage.signInExistingUser();
|
||||
|
||||
// await homePage.sendButton.click();
|
||||
// await sendPage.selectBtcAndGoToSendForm();
|
||||
// });
|
||||
|
||||
test.describe('btc send form', () => {
|
||||
test('can preview and send btc', async ({ page }) => {
|
||||
await page.getByTestId(SendCryptoAssetSelectors.AmountFieldInput).fill('0.000001');
|
||||
|
||||
@@ -10,23 +10,17 @@ import { test } from '../../fixtures/fixtures';
|
||||
test.describe('send stx', () => {
|
||||
let testAddress: string;
|
||||
|
||||
// TODO: Remove with legacy send form
|
||||
test.beforeEach(async () => {
|
||||
test.skip();
|
||||
test.beforeEach(async ({ extensionId, globalPage, homePage, onboardingPage, sendPage }) => {
|
||||
await globalPage.setupAndUseApiCalls(extensionId);
|
||||
await onboardingPage.signInExistingUser();
|
||||
|
||||
testAddress = await homePage.getReceiveStxAddress();
|
||||
await homePage.drawerActionButton.click();
|
||||
|
||||
await homePage.sendButton.click();
|
||||
await sendPage.selectStxAndGoToSendForm();
|
||||
});
|
||||
|
||||
// TODO: Use with new send form
|
||||
// test.beforeEach(async ({ extensionId, globalPage, homePage, onboardingPage, sendPage }) => {
|
||||
// await globalPage.setupAndUseApiCalls(extensionId);
|
||||
// await onboardingPage.signInExistingUser();
|
||||
|
||||
// testAddress = await homePage.getReceiveStxAddress();
|
||||
// await homePage.drawerActionButton.click();
|
||||
|
||||
// await homePage.sendButton.click();
|
||||
// await sendPage.selectStxAndGoToSendForm();
|
||||
// });
|
||||
|
||||
test.describe('send form input fields', () => {
|
||||
test('send all button sets available balance minus fee', async ({ page }) => {
|
||||
await page.getByTestId(SendCryptoAssetSelectors.SendMaxBtn).click();
|
||||
|
||||
Reference in New Issue
Block a user