Skip to content

Commit b836151

Browse files
committed
Add settings screens and fix fetch issues
1 parent b4f07e8 commit b836151

File tree

123 files changed

+6029
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+6029
-78
lines changed

.detoxrc.js

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/** @type {Detox.DetoxConfig} */
2+
module.exports = {
3+
testRunner: {
4+
args: {
5+
$0: 'jest',
6+
config: 'e2e/jest.config.js',
7+
},
8+
jest: {
9+
setupTimeout: 120000,
10+
},
11+
},
12+
apps: {
13+
'ios.debug': {
14+
type: 'ios.app',
15+
binaryPath:
16+
'ios/build/Build/Products/Debug-iphonesimulator/Tasks-and-Treats.app',
17+
build:
18+
'xcodebuild -workspace ios/Tasks-and-Treats.xcworkspace -scheme Tasks-and-Treats -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',
19+
},
20+
'ios.release': {
21+
type: 'ios.app',
22+
binaryPath:
23+
'ios/build/Build/Products/Release-iphonesimulator/Tasks-and-Treats.app',
24+
build:
25+
'xcodebuild -workspace ios/Tasks-and-Treats.xcworkspace -scheme Tasks-and-Treats -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',
26+
},
27+
'android.debug': {
28+
type: 'android.apk',
29+
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
30+
build:
31+
'cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
32+
reversePorts: [8081],
33+
},
34+
'android.release': {
35+
type: 'android.apk',
36+
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
37+
build:
38+
'cd android ; ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release ; cd -',
39+
},
40+
},
41+
devices: {
42+
simulator: {
43+
type: 'ios.simulator',
44+
device: {
45+
type: 'iPhone 14',
46+
},
47+
},
48+
attached: {
49+
type: 'android.attached',
50+
device: {
51+
adbName: '.*',
52+
},
53+
},
54+
emulator: {
55+
type: 'android.emulator',
56+
device: {
57+
avdName: 'Pixel_3a_API_30_x86',
58+
},
59+
},
60+
},
61+
configurations: {
62+
'ios.sim.debug': {
63+
device: 'simulator',
64+
app: 'ios.debug',
65+
},
66+
'ios.sim.release': {
67+
device: 'simulator',
68+
app: 'ios.release',
69+
},
70+
'android.att.debug': {
71+
device: 'attached',
72+
app: 'android.debug',
73+
},
74+
'android.att.release': {
75+
device: 'attached',
76+
app: 'android.release',
77+
},
78+
'android.emu.debug': {
79+
device: 'emulator',
80+
app: 'android.debug',
81+
},
82+
'android.emu.release': {
83+
device: 'emulator',
84+
app: 'android.release',
85+
},
86+
},
87+
};

.expo-shared/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
> Why do I have a folder named ".expo-shared" in my project?
2+
3+
The ".expo-shared" folder is created when running commands that produce state that is intended to be shared with all developers on the project. For example, "npx expo-optimize".
4+
5+
> What does the "assets.json" file contain?
6+
7+
The "assets.json" file describes the assets that have been optimized through "expo-optimize" and do not need to be processed again.
8+
9+
> Should I commit the ".expo-shared" folder?
10+
11+
Yes, you should share the ".expo-shared" folder with your collaborators.

.expo-shared/assets.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.gitignore

+64
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,67 @@ web-build/
1919
# local env files
2020
.env
2121
.env*.local
22+
/test-results/
23+
/playwright-report/
24+
/playwright/.cache/
25+
26+
# @generated expo-cli sync-e7dcf75f4e856f7b6f3239b3f3a7dd614ee755a8
27+
# The following patterns were generated by expo-cli
28+
29+
# OSX
30+
#
31+
.DS_Store
32+
33+
# Xcode
34+
#
35+
build/
36+
*.pbxuser
37+
!default.pbxuser
38+
*.mode1v3
39+
!default.mode1v3
40+
*.mode2v3
41+
!default.mode2v3
42+
*.perspectivev3
43+
!default.perspectivev3
44+
xcuserdata
45+
*.xccheckout
46+
*.moved-aside
47+
DerivedData
48+
*.hmap
49+
*.ipa
50+
*.xcuserstate
51+
project.xcworkspace
52+
53+
# Android/IntelliJ
54+
#
55+
build/
56+
.idea
57+
.gradle
58+
local.properties
59+
*.iml
60+
*.hprof
61+
62+
# node.js
63+
#
64+
node_modules/
65+
npm-debug.log
66+
yarn-error.log
67+
68+
# BUCK
69+
buck-out/
70+
\.buckd/
71+
*.keystore
72+
!debug.keystore
73+
74+
# Bundle artifacts
75+
*.jsbundle
76+
77+
# CocoaPods
78+
/ios/Pods/
79+
80+
# Expo
81+
.expo/
82+
web-build/
83+
dist/
84+
85+
# @end expo-cli

App.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { NavigationContainer, useNavigation } from '@react-navigation/native';
22
import { createNativeStackNavigator } from '@react-navigation/native-stack';
3+
import { useCavy } from 'cavy';
34
import { StatusBar } from 'expo-status-bar';
45
import { useState } from 'react';
56
import { LogBox } from 'react-native';
@@ -9,12 +10,9 @@ import LoginScreen from './screens/LoginScreen';
910
import SecureLogoutScreen from './screens/SecureLogoutScreen';
1011
import SignupScreen from './screens/SignupScreen';
1112
import WelcomeScreen from './screens/WelcomeScreen';
12-
// import AContext from './utils/context/AContext';
1313
import BudgetContext from './utils/context/BudgetContext';
1414
import CartsContext from './utils/context/CartsContext';
1515

16-
// import UserContext from './utils/context/UserContext';
17-
1816
LogBox.ignoreAllLogs(); //Ignore all log notifications
1917

2018
const Stack = createNativeStackNavigator();
@@ -23,11 +21,14 @@ function AuthStack() {
2321
const [carts, setCarts] = useState([]);
2422
const [budget, setBudget] = useState(0);
2523

24+
const generateTestHook = useCavy();
25+
2626
return (
2727
<BudgetContext.Provider value={[budget, setBudget]}>
2828
<CartsContext.Provider value={[carts, setCarts]}>
2929
<Stack.Navigator initialRouteName={'WelcomeScreen'}>
3030
<Stack.Screen
31+
ref={generateTestHook('Welcome.Screen')}
3132
name="WelcomeScreen"
3233
component={WelcomeScreen}
3334
options={{ headerShown: false }}

android/.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Android/IntelliJ
6+
#
7+
build/
8+
.idea
9+
.gradle
10+
local.properties
11+
*.iml
12+
*.hprof
13+
14+
# BUCK
15+
buck-out/
16+
\.buckd/
17+
*.keystore
18+
!debug.keystore
19+
20+
# Bundle artifacts
21+
*.jsbundle

android/app/BUCK

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
13+
lib_deps = []
14+
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
18+
19+
android_library(
20+
name = "all-libs",
21+
exported_deps = lib_deps,
22+
)
23+
24+
android_library(
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
34+
)
35+
36+
android_build_config(
37+
name = "build_config",
38+
package = "com.beppino.tasksandtreats",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.beppino.tasksandtreats",
44+
res = "src/main/res",
45+
)
46+
47+
android_binary(
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
55+
)

0 commit comments

Comments
 (0)