diff --git a/packages/e2e/constants.ts b/packages/e2e/general/constants.ts similarity index 100% rename from packages/e2e/constants.ts rename to packages/e2e/general/constants.ts diff --git a/packages/e2e/utils.ts b/packages/e2e/general/utils.ts similarity index 90% rename from packages/e2e/utils.ts rename to packages/e2e/general/utils.ts index c1a93bdcce..e99f027043 100644 --- a/packages/e2e/utils.ts +++ b/packages/e2e/general/utils.ts @@ -6,12 +6,12 @@ import yargs from 'yargs/yargs' import { mnemonicBadgeByWord, mnemonicByIndexText, -} from './screens/createWalletFlow.screen' -import * as initialScreen from './screens/initialScreen.screen' -import * as myWalletsScreen from './screens/myWallets.screen' -import {pinKeyButton} from './screens/pinCode.screen' -import {mnemonicByIndexInput} from './screens/restoreWalletFlow.screen' -import * as userInsightScreen from './screens/shareUserInsights.screen' +} from '../screens/createWalletFlow.screen' +import * as initialScreen from '../screens/initialScreen.screen' +import * as myWalletsScreen from '../screens/myWallets.screen' +import {pinKeyButton} from '../screens/pinCode.screen' +import {mnemonicByIndexInput} from '../screens/restoreWalletFlow.screen' +import * as userInsightScreen from '../screens/shareUserInsights.screen' export const enterPIN = async (pin: string): Promise => { for (const pinNumber of pin) { diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 7191b184f6..ef4d8acd5b 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -19,9 +19,10 @@ "e2e:test:ios:nightly:debug": "detox test $npm_package_e2ePath_ios --configuration ios.sim.nightly.debug", "e2e:test:ios:nightly:release": "detox test $npm_package_e2ePath_ios --configuration ios.sim.nightly.release", "e2e:test:ios:yoroi:debug": "detox test $npm_package_e2ePath_ios --configuration ios.sim.yoroi.debug", + "tsc": "tsc --noEmit -p tsconfig.json", "lint": "eslint \"**/*.{js,ts,tsx}\"", "lint:fix": "yarn lint --fix", - "build": "yarn lint" + "build": "yarn lint && yarn tsc" }, "prettier": { "bracketSpacing": false, diff --git a/packages/e2e/screens/nftGallery.screen.ts b/packages/e2e/screens/nftGallery.screen.ts index 5e6f14d4b1..f0e7d60cb5 100644 --- a/packages/e2e/screens/nftGallery.screen.ts +++ b/packages/e2e/screens/nftGallery.screen.ts @@ -1,7 +1,7 @@ import {by, element, expect} from 'detox' import jestExpect from 'expect' -import * as utils from '../utils' +import * as utils from '../general/utils' export const iconSearch = () => element(by.id('iconSearch')) export const inputSearch = () => element(by.id('inputSearch')) diff --git a/packages/e2e/tests/_android/create-wallet.test.ts b/packages/e2e/tests/_android/create-wallet.test.ts index b9825f8d19..3ad25816b1 100644 --- a/packages/e2e/tests/_android/create-wallet.test.ts +++ b/packages/e2e/tests/_android/create-wallet.test.ts @@ -1,9 +1,9 @@ import {device, expect} from 'detox' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as createWalletFlow from '../../screens/createWalletFlow.screen' import * as myWalletsScreen from '../../screens/myWallets.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Create a wallet', () => { let seedPhraseText: string[] diff --git a/packages/e2e/tests/_android/general-checks.test.ts b/packages/e2e/tests/_android/general-checks.test.ts index c99d31f1b0..592815b34c 100644 --- a/packages/e2e/tests/_android/general-checks.test.ts +++ b/packages/e2e/tests/_android/general-checks.test.ts @@ -2,7 +2,7 @@ import {device, expect} from 'detox' import * as initialScreen from '../../screens/initialScreen.screen' import * as analyticsScreen from '../../screens/shareUserInsights.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('General checks', () => { beforeAll(async () => { diff --git a/packages/e2e/tests/_android/restore-wallet.test.ts b/packages/e2e/tests/_android/restore-wallet.test.ts index f5780214be..eb552370c7 100644 --- a/packages/e2e/tests/_android/restore-wallet.test.ts +++ b/packages/e2e/tests/_android/restore-wallet.test.ts @@ -1,9 +1,9 @@ import {device, expect} from 'detox' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as myWalletsScreen from '../../screens/myWallets.screen' import * as restoreWalletFlow from '../../screens/restoreWalletFlow.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Restore a wallet', () => { let platform: string diff --git a/packages/e2e/tests/_android/search-nft-gallery.test.ts b/packages/e2e/tests/_android/search-nft-gallery.test.ts index 5d8bf530e0..c708087bf9 100644 --- a/packages/e2e/tests/_android/search-nft-gallery.test.ts +++ b/packages/e2e/tests/_android/search-nft-gallery.test.ts @@ -1,12 +1,12 @@ import {device, expect} from 'detox' import jestExpect from 'expect' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as devOptionsScreen from '../../screens/devOptionsScreen.screen' import * as myWalletsScreen from '../../screens/myWallets.screen' import * as nftGalleryScreen from '../../screens/nftGallery.screen' import * as walletMenuScreen from '../../screens/walletMenuItems.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Search for an NFT from gallery and verify', () => { let nftToSearch: string diff --git a/packages/e2e/tests/_ios/create-wallet.test.ts b/packages/e2e/tests/_ios/create-wallet.test.ts index 954c1623e1..da691d2a45 100644 --- a/packages/e2e/tests/_ios/create-wallet.test.ts +++ b/packages/e2e/tests/_ios/create-wallet.test.ts @@ -1,9 +1,9 @@ import {device, expect} from 'detox' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as createWalletFlow from '../../screens/createWalletFlow.screen' import * as myWalletsScreen from '../../screens/myWallets.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Create a wallet', () => { let seedPhraseText: string[] diff --git a/packages/e2e/tests/_ios/general-checks.test.ts b/packages/e2e/tests/_ios/general-checks.test.ts index c99d31f1b0..592815b34c 100644 --- a/packages/e2e/tests/_ios/general-checks.test.ts +++ b/packages/e2e/tests/_ios/general-checks.test.ts @@ -2,7 +2,7 @@ import {device, expect} from 'detox' import * as initialScreen from '../../screens/initialScreen.screen' import * as analyticsScreen from '../../screens/shareUserInsights.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('General checks', () => { beforeAll(async () => { diff --git a/packages/e2e/tests/_ios/restore-wallet.test.ts b/packages/e2e/tests/_ios/restore-wallet.test.ts index 7db9943e50..3c6c943b66 100644 --- a/packages/e2e/tests/_ios/restore-wallet.test.ts +++ b/packages/e2e/tests/_ios/restore-wallet.test.ts @@ -1,9 +1,9 @@ import {device, expect} from 'detox' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as myWalletsScreen from '../../screens/myWallets.screen' import * as restoreWalletFlow from '../../screens/restoreWalletFlow.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Restore a wallet', () => { let platform: string diff --git a/packages/e2e/tests/_ios/search-nft-gallery.test.ts b/packages/e2e/tests/_ios/search-nft-gallery.test.ts index 6f5b127166..707ba09afe 100644 --- a/packages/e2e/tests/_ios/search-nft-gallery.test.ts +++ b/packages/e2e/tests/_ios/search-nft-gallery.test.ts @@ -1,12 +1,12 @@ import {device, expect} from 'detox' import jestExpect from 'expect' -import * as constants from '../../constants' +import * as constants from '../../general/constants' import * as devOptionsScreen from '../../screens/devOptionsScreen.screen' import * as myWalletsScreen from '../../screens/myWallets.screen' import * as nftGalleryScreen from '../../screens/nftGallery.screen' import * as walletMenuScreen from '../../screens/walletMenuItems.screen' -import * as utils from '../../utils' +import * as utils from '../../general/utils' describe('Search for an NFT from gallery and verify', () => { let nftToSearch: string diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json index 958e95105e..84bc16fc38 100644 --- a/packages/e2e/tsconfig.json +++ b/packages/e2e/tsconfig.json @@ -1,15 +1,16 @@ { + "extends": "@tsconfig/react-native/tsconfig.json", "compilerOptions": { "allowJs": false, "lib": ["es2019", "dom"], "moduleResolution": "node", "strict": true, "noImplicitAny": false, - "types": ["react", "react-native", "jest", "node", "chai"], + "types": ["jest", "node", "chai"], "baseUrl": ".", "paths": { "*.md": ["text-loader"] } }, - "exclude": ["**/*.spec.ts"] -} \ No newline at end of file + "include": ["./general", "./screen", "./tests"] +}