diff --git a/test/e2e/accounts/snap-account-eth-swap.spec.ts b/test/e2e/accounts/snap-account-eth-swap.spec.ts index f25c537ecc5d..bb4c3c7a5770 100644 --- a/test/e2e/accounts/snap-account-eth-swap.spec.ts +++ b/test/e2e/accounts/snap-account-eth-swap.spec.ts @@ -1,18 +1,19 @@ -/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */ import { withFixtures, defaultGanacheOptions, WINDOW_TITLES } from '../helpers'; import { Driver } from '../webdriver/driver'; -import { installSnapSimpleKeyring } from './common'; - -const FixtureBuilder = require('../fixture-builder'); -const { +import FixtureBuilder from '../fixture-builder'; +import { buildQuote, reviewQuote, waitForTransactionToComplete, checkActivityTransaction, -} = require('../tests/swaps/shared'); +} from '../tests/swaps/shared'; +import { installSnapSimpleKeyring } from './common'; + +const DAI = 'DAI'; +const TEST_ETH = 'TESTETH'; -describe('Snap account swap', function () { - it('exchanges native token (ETH) for DAI', async function () { +describe('Snap Account - Swap', function () { + it('swaps ETH for DAI using a snap account', async function () { await withFixtures( { fixtures: new FixtureBuilder().build(), @@ -26,20 +27,20 @@ describe('Snap account swap', function () { ); await buildQuote(driver, { amount: 0.001, - swapTo: 'DAI', + swapTo: DAI, }); await reviewQuote(driver, { amount: 0.001, - swapFrom: 'TESTETH', - swapTo: 'DAI', + swapFrom: TEST_ETH, + swapTo: DAI, }); await driver.clickElement({ text: 'Swap', tag: 'button' }); await waitForTransactionToComplete(driver, { tokenName: 'DAI' }); await checkActivityTransaction(driver, { index: 0, amount: '0.001', - swapFrom: 'TESTETH', - swapTo: 'DAI', + swapFrom: TEST_ETH, + swapTo: DAI, }); }, );