-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@nx/react/babel", | ||
{ | ||
"runtime": "automatic" | ||
} | ||
] | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"testRunner": { | ||
"args": { | ||
"$0": "jest", | ||
"config": "./jest.config.json" | ||
}, | ||
"jest": { | ||
"setupTimeout": 120000 | ||
} | ||
}, | ||
"apps": { | ||
"ios.debug": { | ||
"type": "ios.app", | ||
"build": "cd ../../apps/mobile/ios && xcodebuild -workspace Mobile.xcworkspace -scheme Mobile -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet", | ||
"binaryPath": "../../apps/mobile/ios/build/Build/Products/Debug-iphonesimulator/Mobile.app" | ||
}, | ||
"ios.release": { | ||
"type": "ios.app", | ||
"build": "cd ../../apps/mobile/ios && xcodebuild -workspace Mobile.xcworkspace -scheme Mobile -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet", | ||
"binaryPath": "../../apps/mobile/ios/build/Build/Products/Release-iphonesimulator/Mobile.app" | ||
}, | ||
|
||
"ios.local": { | ||
"type": "ios.app", | ||
"build": "yarn nx run mobile:build --platform ios --profile preview --wait --local --no-interactive --output=../../apps/mobile/dist/Mobile.tar.gz", | ||
"binaryPath": "../../apps/mobile/dist/Mobile.app" | ||
}, | ||
|
||
"android.debug": { | ||
"type": "android.apk", | ||
"build": "cd ../../apps/mobile/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug", | ||
"binaryPath": "../../apps/mobile/android/app/build/outputs/apk/debug/app-debug.apk" | ||
}, | ||
"android.release": { | ||
"type": "android.apk", | ||
"build": "cd ../../apps/mobile/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release", | ||
"binaryPath": "../../apps/mobile/android/app/build/outputs/apk/release/app-release.apk" | ||
}, | ||
|
||
"android.local": { | ||
"type": "android.apk", | ||
"build": "yarn nx run mobile:build --platform android --profile preview --wait --local --no-interactive --output=../../apps/mobile/dist/Mobile.apk", | ||
"binaryPath": "../../apps/mobile/dist/Mobile.apk" | ||
} | ||
}, | ||
"devices": { | ||
"simulator": { | ||
"type": "ios.simulator", | ||
"device": { | ||
"type": "iPhone 14" | ||
} | ||
}, | ||
"emulator": { | ||
"type": "android.emulator", | ||
"device": { | ||
"avdName": "Pixel_4a_API_30" | ||
} | ||
} | ||
}, | ||
"configurations": { | ||
"ios.sim.release": { | ||
"device": "simulator", | ||
"app": "ios.release" | ||
}, | ||
"ios.sim.debug": { | ||
"device": "simulator", | ||
"app": "ios.debug" | ||
}, | ||
|
||
"ios.sim.local": { | ||
"device": "simulator", | ||
"app": "ios.local" | ||
}, | ||
|
||
"android.emu.release": { | ||
"device": "emulator", | ||
"app": "android.release" | ||
}, | ||
"android.emu.debug": { | ||
"device": "emulator", | ||
"app": "android.debug" | ||
}, | ||
|
||
"android.emu.local": { | ||
"device": "emulator", | ||
"app": "android.local" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["plugin:@nx/react", "../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"preset": "../../jest.preset", | ||
"rootDir": ".", | ||
"testMatch": [ | ||
"<rootDir>/src/**/*.test.ts?(x)", | ||
"<rootDir>/src/**/*.spec.ts?(x)" | ||
], | ||
"testTimeout": 120000, | ||
"maxWorkers": 1, | ||
"globalSetup": "detox/runners/jest/globalSetup", | ||
"globalTeardown": "detox/runners/jest/globalTeardown", | ||
"reporters": ["detox/runners/jest/reporter"], | ||
"testEnvironment": "detox/runners/jest/testEnvironment", | ||
"verbose": true, | ||
"setupFilesAfterEnv": ["<rootDir>/test-setup.ts"], | ||
"transform": { | ||
"^.+\\.(ts|js|html)$": [ | ||
"ts-jest", | ||
{ "tsconfig": "<rootDir>/tsconfig.e2e.json" } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"name": "mobile-e2e", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/mobile-e2e/src", | ||
"projectType": "application", | ||
"targets": { | ||
"build-ios": { | ||
"executor": "@nx/detox:build", | ||
"options": { | ||
"detoxConfiguration": "ios.sim.local" | ||
}, | ||
"configurations": { | ||
"bare": { | ||
"detoxConfiguration": "ios.sim.debug" | ||
}, | ||
"production": { | ||
"detoxConfiguration": "ios.sim.release" | ||
} | ||
} | ||
}, | ||
"test-ios": { | ||
"executor": "@nx/detox:test", | ||
"options": { | ||
"detoxConfiguration": "ios.sim.local", | ||
"buildTarget": "mobile-e2e:build-ios" | ||
}, | ||
"configurations": { | ||
"bare": { | ||
"detoxConfiguration": "ios.sim.debug", | ||
"buildTarget": "mobile-e2e:build-ios:bare" | ||
}, | ||
"production": { | ||
"detoxConfiguration": "ios.sim.release", | ||
"buildTarget": "mobile-e2e:build-ios:production" | ||
} | ||
} | ||
}, | ||
"build-android": { | ||
"executor": "@nx/detox:build", | ||
"options": { | ||
"detoxConfiguration": "android.emu.local" | ||
}, | ||
"configurations": { | ||
"bare": { | ||
"detoxConfiguration": "android.emu.debug" | ||
}, | ||
"production": { | ||
"detoxConfiguration": "android.emu.release" | ||
} | ||
} | ||
}, | ||
"test-android": { | ||
"executor": "@nx/detox:test", | ||
"options": { | ||
"detoxConfiguration": "android.emu.local", | ||
"buildTarget": "mobile-e2e:build-android" | ||
}, | ||
"configurations": { | ||
"bare": { | ||
"detoxConfiguration": "android.emu.debug", | ||
"buildTarget": "mobile-e2e:build-android:bare" | ||
}, | ||
"production": { | ||
"detoxConfiguration": "android.emu.release", | ||
"buildTarget": "mobile-e2e:build-android:production" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/mobile/**/*.{ts,tsx,js,jsx}"] | ||
} | ||
} | ||
}, | ||
"tags": [], | ||
"implicitDependencies": ["mobile"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { device, element, by, expect } from 'detox' | ||
|
||
describe('Mobile', () => { | ||
beforeEach(async () => { | ||
await device.reloadReactNative() | ||
}) | ||
|
||
it('should display welcome message', async () => { | ||
await expect(element(by.id('heading'))).toHaveText('Welcome Mobile 👋') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { device } from 'detox' | ||
|
||
beforeAll(async () => { | ||
await device.launchApp() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"sourceMap": false, | ||
"outDir": "../../dist/out-tsc", | ||
"allowJs": true, | ||
"types": ["node", "jest", "detox"] | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"files": [], | ||
"include": [], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.e2e.json" | ||
} | ||
] | ||
} |