Skip to content

Commit

Permalink
feat(mobile-alphabet): implement routing
Browse files Browse the repository at this point in the history
* WIP: add routing with detox tests

* WIP: test routes with detox using typescript

* WIP: change home screen button to Alphabet

* WIP: make changes from PR suggestions
  • Loading branch information
jbambrick authored and aaron-plahn committed Nov 23, 2023
1 parent 403b51d commit 82386bc
Show file tree
Hide file tree
Showing 13 changed files with 4,630 additions and 685 deletions.
80 changes: 80 additions & 0 deletions .detoxrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"testRunner": {
"args": {
"$0": "jest",
"config": "e2e/jest.config.ts"
},
"jest": {
"setupTimeout": 120000
}
},
"apps": {
"ios.debug": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/YOUR_APP.app",
"build": "xcodebuild -workspace ios/YOUR_APP.xcworkspace -scheme YOUR_APP -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"
},
"ios.release": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/YOUR_APP.app",
"build": "xcodebuild -workspace ios/YOUR_APP.xcworkspace -scheme YOUR_APP -configuration Release -sdk iphonesimulator -derivedDataPath ios/build"
},
"android.debug": {
"type": "android.apk",
"build": "cd apps/mobile-alphabet/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug",
"binaryPath": "apps/mobile-alphabet/android/app/build/outputs/apk/debug/app-debug.apk",
"reversePorts": [8081]
},
"android.release": {
"type": "android.apk",
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release"
}
},
"devices": {
"simulator": {
"type": "ios.simulator",
"device": {
"type": "iPhone 12"
}
},
"attached": {
"type": "android.attached",
"device": {
"adbName": ".*"
}
},
"emulator": {
"type": "android.emulator",
"device": {
"avdName": "Pixel_3a_API_34_extension_level_7_x86_64"
}
}
},
"configurations": {
"ios.sim.debug": {
"device": "simulator",
"app": "ios.debug"
},
"ios.sim.release": {
"device": "simulator",
"app": "ios.release"
},
"android.att.debug": {
"device": "attached",
"app": "android.debug"
},
"android.att.release": {
"device": "attached",
"app": "android.release"
},
"android.emu.debug": {
"device": "emulator",
"app": "android.debug"
},
"android.emu.release": {
"device": "emulator",
"app": "android.release"
}
}
}
2 changes: 1 addition & 1 deletion apps/mobile-alphabet-e2e/.detoxrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"emulator": {
"type": "android.emulator",
"device": {
"avdName": "Pixel_4a_API_30"
"avdName": "Pixel_3a_API_34_extension_level_7_x86_64"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package com.mobilealphabet;

import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;

public class MainActivity extends ReactActivity {



/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
Expand All @@ -16,6 +19,11 @@ protected String getMainComponentName() {
return "MobileAlphabet";
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}

/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
Expand Down
15 changes: 11 additions & 4 deletions apps/mobile-alphabet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@react-native-async-storage/async-storage": "*",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^6.1.9",
"@testing-library/jest-native": "*",
"@testing-library/react-native": "*",
"react": "*",
"react-native": "*",
"react-native": "^0.72.6",
"react-native-config": "*",
"react-native-svg": "*",
"@react-native-async-storage/async-storage": "*"
}
"react-native-gesture-handler": "^2.13.4",
"react-native-reanimated": "^3.5.4",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-svg": "*"
},
"devDependencies": {}
}
Loading

0 comments on commit 82386bc

Please sign in to comment.