Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8db08e7
:construction: Work in progress
leonardobrito Feb 1, 2023
91036f6
:truck: Move files to src folder
leonardobrito Feb 1, 2023
47abdd9
:truck: Move path on app file
leonardobrito Feb 2, 2023
52e3299
:lipstick: Add the UI and style files
leonardobrito Feb 2, 2023
79512b4
:construction: Work in progress
leonardobrito Feb 6, 2023
565b064
:fire: Remove package
leonardobrito Feb 10, 2023
e495923
:recycle: Refactor code
leonardobrito Feb 10, 2023
d3f6122
:lipstick: Increase the Login UI
leonardobrito Feb 10, 2023
969ed53
:package: Update packages
leonardobrito Feb 10, 2023
fb37c87
:rocket: Add new props to ui components
leonardobrito Feb 10, 2023
dd5459a
:iphone: Work on responsive design
leonardobrito Feb 10, 2023
d4c7e77
:sparkles: Introduce UIDivider
leonardobrito Feb 10, 2023
7349b49
:lipstick: Update the Signin UI screen
leonardobrito Feb 10, 2023
569ef1a
:white_check_mark: Update tests files
leonardobrito Feb 16, 2023
db094b2
:test_tube: Add classNames tests
leonardobrito Feb 16, 2023
60d414f
:wrench: Update jest configuration files
leonardobrito Feb 16, 2023
f471f8a
:fire: Remove files
leonardobrito Feb 16, 2023
173a3ee
:heavy_plus_sign: Add a dependency
leonardobrito Feb 16, 2023
a6a1f5e
:white_check_mark: Add Home test
leonardobrito Feb 16, 2023
43e80c7
:white_check_mark: Add Home screen tests
leonardobrito Feb 17, 2023
fb3295e
:white_check_mark: Add SignIn screen tests
leonardobrito Feb 17, 2023
e4ca8d8
:see_no_evil: Update .gitignore file
leonardobrito Feb 19, 2023
145f18e
:package: Update packages and move files
leonardobrito Feb 19, 2023
9aa8b92
:alien: Add API call to auth
leonardobrito Feb 19, 2023
83c93d6
:construction: Work in progress
leonardobrito Feb 19, 2023
f653f3e
:camera_flash: Update snapshots
leonardobrito Feb 19, 2023
adce9fb
:truck: Move files
leonardobrito Feb 20, 2023
12d6e45
:necktie: Add auth provider
leonardobrito Feb 20, 2023
3b70c2a
:package: Add expo-secure-store package
leonardobrito Feb 20, 2023
e4d95dc
:necktie: Add public/private router business logic
leonardobrito Feb 20, 2023
404d753
:sparkles: Add loading on buttons
leonardobrito Feb 22, 2023
ec7f07b
:rocket: Add loading state on auth
leonardobrito Feb 22, 2023
60da8e2
:camera_flash: Update snapshots
leonardobrito Feb 22, 2023
209a6f4
:white_check_mark: Add ui-button tests
leonardobrito Feb 22, 2023
587c402
:white_check_mark: Add UIContent tests
leonardobrito Feb 22, 2023
ec09cd3
:white_check_mark: Add UIDivider tests
leonardobrito Feb 22, 2023
f71435a
:clown_face: Mock api requests
leonardobrito Feb 22, 2023
0e60ee6
:white_check_mark: Update SignIn tests
leonardobrito Feb 22, 2023
607837a
Merge branch 'main' into feat-login
leonardobrito Mar 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions so-expo/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_API_URL="https://group-habits.herokuapp.com/api"
6 changes: 6 additions & 0 deletions so-expo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ web-build/

# testing
/coverage

#vscode
.vscode

#environments
.env
1 change: 0 additions & 1 deletion so-expo/App.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen, waitFor } from '@testing-library/react-native';
import React from 'react';
import App from './App';

function setup() {
Expand Down
12 changes: 8 additions & 4 deletions so-expo/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { StatusBar } from 'expo-status-bar';
import 'react-native-gesture-handler';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { AuthProvider } from './src/contexts/AuthContext';

import useCachedResources from './hooks/useCachedResources';
import useColorScheme from './hooks/useColorScheme';
import Navigation from './navigation';
import useCachedResources from './src/hooks/useCachedResources';
import useColorScheme from './src/hooks/useColorScheme';
import Navigation from './src/navigation';

export default function App() {
const isLoadingComplete = useCachedResources();
Expand All @@ -14,7 +16,9 @@ export default function App() {
} else {
return (
<SafeAreaProvider>
<Navigation colorScheme={colorScheme} />
<AuthProvider>
<Navigation colorScheme={colorScheme} />
</AuthProvider>
<StatusBar />
</SafeAreaProvider>
);
Expand Down
8 changes: 4 additions & 4 deletions so-expo/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"slug": "so-expo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"icon": "./src/assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"image": "./src/assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
Expand All @@ -23,12 +23,12 @@
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"foregroundImage": "./src/assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/images/favicon.png"
"favicon": "./src/assets/images/favicon.png"
},
"extra": {
"eas": {
Expand Down
15 changes: 13 additions & 2 deletions so-expo/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo']
presets: ['babel-preset-expo'],
plugins: [
"nativewind/babel",
[
"module:react-native-dotenv",
{
envName: "APP_ENV",
moduleName: "@env",
path: ".env"
}
],
],
};
};
19 changes: 0 additions & 19 deletions so-expo/constants/Colors.ts

This file was deleted.

28 changes: 28 additions & 0 deletions so-expo/jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ import '@testing-library/jest-native/extend-expect';
// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

// include this line for mocking react-native-gesture-handler
import 'react-native-gesture-handler/jestSetup';

// include this section and the NativeAnimatedHelper section for mocking react-native-reanimated
// jest.mock('react-native-reanimated', () => {
// const Reanimated = require('react-native-reanimated/mock');

// // The mock for `call` immediately calls the callback which is incorrect
// // So we override it with a no-op
// Reanimated.default.call = () => { };

// return Reanimated;
// });

// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');


// Enable excluding hidden elements from the queries by default
configure({
defaultIncludeHiddenElements: false,
Expand All @@ -20,3 +38,13 @@ jest.mock('expo-linking', () => {

return module;
});

// src/setupTests.js
import { server } from './src/mocks/server';
// Establish API mocking before all tests.
beforeAll(() => server.listen())
// Reset any request handlers that we may add during the tests,
// so they don't affect other tests.
afterEach(() => server.resetHandlers())
// Clean up after the tests are finished.
afterAll(() => server.close())
8 changes: 6 additions & 2 deletions so-expo/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ export default {
coverageProvider: "v8",
preset: 'jest-expo',
roots: [
"<rootDir>"
"<rootDir>/src"
],
testMatch: [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)"
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
setupFilesAfterEnv: [
'<rootDir>/jest-setup.ts',
"@testing-library/jest-native/extend-expect",
],
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
],
Expand Down
36 changes: 0 additions & 36 deletions so-expo/navigation/LinkingConfiguration.ts

This file was deleted.

107 changes: 0 additions & 107 deletions so-expo/navigation/index.tsx

This file was deleted.

Loading