From 716a09312a6db7bdb266545ce891c73a28045177 Mon Sep 17 00:00:00 2001 From: BrodyHughes <41711440+BrodyHughes@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:45:59 -0500 Subject: [PATCH] . --- e2e/deeplinks.spec.js | 1 - e2e/discoverSheetFlow.spec.js | 3 +-- e2e/hardhatTransactionFlowSendAndWC.spec.js | 3 +-- e2e/hardhatTransactionFlowSwaps.disabled.js | 3 +-- e2e/hiddenTokensFlow.disable.js | 4 +--- e2e/homeScreen.spec.js | 3 +-- e2e/importPrivateKeyFlow.spec.js | 3 +-- e2e/importPrivateKeyFlow0x.spec.js | 3 +-- e2e/init.js | 3 +-- e2e/newWalletFlow.spec.js | 3 +-- e2e/registerENSFlow.spec.js | 3 +-- e2e/sendSheetFlow.spec.js | 3 +-- e2e/sendSheetFlowContacts.spec.js | 3 +-- e2e/swapSheetFlow1.disabled.js | 4 +--- e2e/swapSheetFlow2.disabled.js | 5 +---- e2e/walletAvatarOptions.disabled.js | 4 +--- e2e/watchAddressFlow.spec.js | 3 +-- e2e/watchedWalletCollectionActionsFlow.spec.js | 4 +--- 18 files changed, 17 insertions(+), 41 deletions(-) diff --git a/e2e/deeplinks.spec.js b/e2e/deeplinks.spec.js index 03bb7cf5974..471049c3138 100644 --- a/e2e/deeplinks.spec.js +++ b/e2e/deeplinks.spec.js @@ -40,7 +40,6 @@ beforeAll(async () => { } }); -// eslint-disable-next-line jest/no-disabled-tests describe.skip('Deeplinks spec', () => { it('Should show the welcome screen', async () => { await Helpers.checkIfVisible('welcome-screen'); diff --git a/e2e/discoverSheetFlow.spec.js b/e2e/discoverSheetFlow.spec.js index aa7aa44956c..4e99d040827 100644 --- a/e2e/discoverSheetFlow.spec.js +++ b/e2e/discoverSheetFlow.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const ios = device.getPlatform() === 'ios'; const android = device.getPlatform() === 'android'; diff --git a/e2e/hardhatTransactionFlowSendAndWC.spec.js b/e2e/hardhatTransactionFlowSendAndWC.spec.js index 9ecf34c81e0..c93e557a232 100644 --- a/e2e/hardhatTransactionFlowSendAndWC.spec.js +++ b/e2e/hardhatTransactionFlowSendAndWC.spec.js @@ -1,11 +1,10 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import { Contract } from '@ethersproject/contracts'; import WalletConnect from '@walletconnect/client'; import { convertUtf8ToHex } from '@walletconnect/legacy-utils'; import * as Helpers from './helpers'; import kittiesABI from '@/references/cryptokitties-abi.json'; import erc20ABI from '@/references/erc20-abi.json'; +import { device } from 'detox'; let connector = null; let uri = null; diff --git a/e2e/hardhatTransactionFlowSwaps.disabled.js b/e2e/hardhatTransactionFlowSwaps.disabled.js index edbfe5f7e55..ca4007a28b7 100644 --- a/e2e/hardhatTransactionFlowSwaps.disabled.js +++ b/e2e/hardhatTransactionFlowSwaps.disabled.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; let connector = null; const ios = device.getPlatform() === 'ios'; diff --git a/e2e/hiddenTokensFlow.disable.js b/e2e/hiddenTokensFlow.disable.js index 4ed87bfa49d..c8dfc1941d6 100644 --- a/e2e/hiddenTokensFlow.disable.js +++ b/e2e/hiddenTokensFlow.disable.js @@ -1,10 +1,8 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device, element, by, waitFor } from 'detox'; const android = device.getPlatform() === 'android'; -// eslint-disable-next-line jest/no-disabled-tests describe.skip('Hidden tokens flow', () => { it('boots and loads wallet screen', async () => { await Helpers.waitAndTap('already-have-wallet-button'); diff --git a/e2e/homeScreen.spec.js b/e2e/homeScreen.spec.js index ca6f822634c..38aa4c765ad 100644 --- a/e2e/homeScreen.spec.js +++ b/e2e/homeScreen.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const RAINBOW_TEST_WALLET = 'rainbowtestwallet.eth'; diff --git a/e2e/importPrivateKeyFlow.spec.js b/e2e/importPrivateKeyFlow.spec.js index df96f0a838c..87ad443ddd4 100644 --- a/e2e/importPrivateKeyFlow.spec.js +++ b/e2e/importPrivateKeyFlow.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const android = device.getPlatform() === 'android'; diff --git a/e2e/importPrivateKeyFlow0x.spec.js b/e2e/importPrivateKeyFlow0x.spec.js index abe3436e9b9..ce629486a1a 100644 --- a/e2e/importPrivateKeyFlow0x.spec.js +++ b/e2e/importPrivateKeyFlow0x.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const android = device.getPlatform() === 'android'; diff --git a/e2e/init.js b/e2e/init.js index 182685a195b..b8182e77177 100644 --- a/e2e/init.js +++ b/e2e/init.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -// eslint-disable-next-line import/no-commonjs import { exec } from 'child_process'; +import { device } from 'detox'; require('dotenv').config({ path: '.env' }); diff --git a/e2e/newWalletFlow.spec.js b/e2e/newWalletFlow.spec.js index 04ea1206ac2..e7680556c12 100644 --- a/e2e/newWalletFlow.spec.js +++ b/e2e/newWalletFlow.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const android = device.getPlatform() === 'android'; diff --git a/e2e/registerENSFlow.spec.js b/e2e/registerENSFlow.spec.js index 6119af41f27..f74c9f68255 100644 --- a/e2e/registerENSFlow.spec.js +++ b/e2e/registerENSFlow.spec.js @@ -1,11 +1,10 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import { hash } from '@ensdomains/eth-ens-namehash'; import { Contract } from '@ethersproject/contracts'; import * as Helpers from './helpers'; import registrarABI from '@/references/ens/ENSETHRegistrarController.json'; import publicResolverABI from '@/references/ens/ENSPublicResolver.json'; import registryWithFallbackABI from '@/references/ens/ENSRegistryWithFallback.json'; +import { device } from 'detox'; const ensETHRegistrarControllerAddress = '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5'; const ensPublicResolverAddress = '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'; diff --git a/e2e/sendSheetFlow.spec.js b/e2e/sendSheetFlow.spec.js index 892a140fffd..aada0e627bb 100644 --- a/e2e/sendSheetFlow.spec.js +++ b/e2e/sendSheetFlow.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; describe('Send Sheet Interaction Flow', () => { beforeAll(async () => { diff --git a/e2e/sendSheetFlowContacts.spec.js b/e2e/sendSheetFlowContacts.spec.js index af71798ee8b..cab00f958bc 100644 --- a/e2e/sendSheetFlowContacts.spec.js +++ b/e2e/sendSheetFlowContacts.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const android = device.getPlatform() === 'android'; diff --git a/e2e/swapSheetFlow1.disabled.js b/e2e/swapSheetFlow1.disabled.js index a06b2ca91e9..b0e81648601 100644 --- a/e2e/swapSheetFlow1.disabled.js +++ b/e2e/swapSheetFlow1.disabled.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; const ios = device.getPlatform() === 'ios'; const android = device.getPlatform() === 'android'; @@ -8,7 +7,6 @@ const android = device.getPlatform() === 'android'; // all relevant flows skipped at the moment // removing this test from the flow until we fix -// eslint-disable-next-line jest/no-disabled-tests describe.skip('Swap Sheet Interaction Flow', () => { beforeAll(async () => { await Helpers.startHardhat(); diff --git a/e2e/swapSheetFlow2.disabled.js b/e2e/swapSheetFlow2.disabled.js index a6308bb245a..e3482a46e3b 100644 --- a/e2e/swapSheetFlow2.disabled.js +++ b/e2e/swapSheetFlow2.disabled.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; beforeAll(async () => { await Helpers.startHardhat(); @@ -14,8 +13,6 @@ const android = device.getPlatform() === 'android'; // part of the addy's REST API migration // // marking the test as SKIP for now - -// eslint-disable-next-line jest/no-disabled-tests describe.skip('Swap Sheet Interaction Flow', () => { it('Should show the welcome screen', async () => { await Helpers.checkIfVisible('welcome-screen'); diff --git a/e2e/walletAvatarOptions.disabled.js b/e2e/walletAvatarOptions.disabled.js index d6f62c27a30..b6aab56a5ca 100644 --- a/e2e/walletAvatarOptions.disabled.js +++ b/e2e/walletAvatarOptions.disabled.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device, element, by } from 'detox'; const WALLET_AVATAR_COORDS = { x: 210, y: 125 }; const WALLET_ADDRESS_COORDS = { x: 210, y: 185 }; @@ -13,7 +12,6 @@ const EMPTY_WALLET = '0x6791da9CCd95405e73d6a1117d02Dc81c4E58775'; const android = device.getPlatform() === 'android'; -// eslint-disable-next-line jest/no-disabled-tests describe('Wallet avatar options', () => { it('watch wallet without ENS', async () => { await Helpers.checkIfVisible('welcome-screen'); diff --git a/e2e/watchAddressFlow.spec.js b/e2e/watchAddressFlow.spec.js index 18290e6bc94..4d728a35ba2 100644 --- a/e2e/watchAddressFlow.spec.js +++ b/e2e/watchAddressFlow.spec.js @@ -1,6 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ import * as Helpers from './helpers'; +import { device } from 'detox'; describe('Watch address flow', () => { afterAll(async () => { diff --git a/e2e/watchedWalletCollectionActionsFlow.spec.js b/e2e/watchedWalletCollectionActionsFlow.spec.js index 4f76286b429..d53e236573c 100644 --- a/e2e/watchedWalletCollectionActionsFlow.spec.js +++ b/e2e/watchedWalletCollectionActionsFlow.spec.js @@ -1,7 +1,5 @@ -/* eslint-disable no-undef */ -/* eslint-disable jest/expect-expect */ -import { exec } from 'child_process'; import * as Helpers from './helpers'; +import { device, element, by } from 'detox'; describe('Watched showcase and hidden actions flow', () => { afterAll(async () => {