refactor: kill old send form and tests

This commit is contained in:
fbwoolf
2023-02-19 15:45:07 -06:00
committed by Fara Woolf
parent 3c80f77f26
commit 3847d7e4e3
60 changed files with 83 additions and 3097 deletions

View File

@@ -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);

View File

@@ -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');

View File

@@ -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();