From cedb87cf4ff25d5ba3154db1fd5d0568325051fe Mon Sep 17 00:00:00 2001 From: Plasma Corral <32695229+plasmacorral@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:05:44 -0400 Subject: [PATCH 1/2] Remove unused fixtures and fix test name --- test/e2e/accounts/smart-swap-disabled.spec.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/e2e/accounts/smart-swap-disabled.spec.ts b/test/e2e/accounts/smart-swap-disabled.spec.ts index e12f7bcae7c2..fe8c7b27889d 100644 --- a/test/e2e/accounts/smart-swap-disabled.spec.ts +++ b/test/e2e/accounts/smart-swap-disabled.spec.ts @@ -1,17 +1,19 @@ -import { title } from 'process'; import { Suite } from 'mocha'; -import { withFixtures } from '../helpers'; +import { withFixtures, defaultGanacheOptions } from '../helpers'; import { Driver } from '../webdriver/driver'; -import { - accountSnapFixtures, - installSnapSimpleKeyring, - makeNewAccountAndSwitch, -} from './common'; +import { installSnapSimpleKeyring, makeNewAccountAndSwitch } from './common'; + +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires +const FixtureBuilder = require('../fixture-builder'); describe('Smart Swaps', function (this: Suite) { it('should be disabled for snap accounts', async function () { await withFixtures( - accountSnapFixtures(title), + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test?.fullTitle(), + }, async ({ driver }: { driver: Driver }) => { await installSnapSimpleKeyring(driver, false); await makeNewAccountAndSwitch(driver); From 52bc178110ecd2b0691ee570c7b5dd872d198b10 Mon Sep 17 00:00:00 2001 From: Plasma Corral <32695229+plasmacorral@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:13:43 -0400 Subject: [PATCH 2/2] use import instead of require, and update test name --- test/e2e/accounts/smart-swap-disabled.spec.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/e2e/accounts/smart-swap-disabled.spec.ts b/test/e2e/accounts/smart-swap-disabled.spec.ts index fe8c7b27889d..4e6ce9b2c6ef 100644 --- a/test/e2e/accounts/smart-swap-disabled.spec.ts +++ b/test/e2e/accounts/smart-swap-disabled.spec.ts @@ -1,13 +1,11 @@ import { Suite } from 'mocha'; import { withFixtures, defaultGanacheOptions } from '../helpers'; import { Driver } from '../webdriver/driver'; +import FixtureBuilder from '../fixture-builder'; import { installSnapSimpleKeyring, makeNewAccountAndSwitch } from './common'; -// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -const FixtureBuilder = require('../fixture-builder'); - -describe('Smart Swaps', function (this: Suite) { - it('should be disabled for snap accounts', async function () { +describe('Snap Account - Smart Swaps', function (this: Suite) { + it('checks if smart swaps are disabled for snap accounts', async function () { await withFixtures( { fixtures: new FixtureBuilder().build(),