Skip to content

Commit

Permalink
refactor + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulnr7 committed Oct 18, 2023
1 parent ec5eea8 commit a9d3361
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 25 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/e2e/utils.ts → packages/e2e/general/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> => {
for (const pinNumber of pin) {
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/screens/nftGallery.screen.ts
Original file line number Diff line number Diff line change
@@ -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'))
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_android/create-wallet.test.ts
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/tests/_android/general-checks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_android/restore-wallet.test.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_android/search-nft-gallery.test.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_ios/create-wallet.test.ts
Original file line number Diff line number Diff line change
@@ -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[]
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/tests/_ios/general-checks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_ios/restore-wallet.test.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tests/_ios/search-nft-gallery.test.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions packages/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
"include": ["./general", "./screen", "./tests"]
}

0 comments on commit a9d3361

Please sign in to comment.