Verified Commit 3cd439ae authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Introduce new folder structure

parent c186be40
......@@ -3,13 +3,13 @@ import { expectSaga } from 'redux-saga-test-plan';
import * as matchers from 'redux-saga-test-plan/matchers';
import { throwError } from 'redux-saga-test-plan/providers';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import calendarSaga from '../../app/sagas/calendar';
import * as calendarActions from '../../app/actions/calendar';
import * as navActions from '../../app/actions/navigation';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -3,7 +3,7 @@ import { select } from 'redux-saga/effects';
import { expectSaga } from 'redux-saga-test-plan';
import deepLinkingSaga, { parseURL } from '../../app/sagas/deepLinking';
import * as deepLinkingActions from '../../app/actions/deepLinking';
import { url as siteURL, apiRequest, loggedInSelector } from '../../app/url';
import { url as siteURL, apiRequest, loggedInSelector } from '../../app/utils/url';
import * as navigationActions from '../../app/actions/navigation';
import * as eventActions from '../../app/actions/event';
import * as loginActions from '../../app/actions/login';
......
......@@ -3,13 +3,13 @@ import { expectSaga } from 'redux-saga-test-plan';
import * as matchers from 'redux-saga-test-plan/matchers';
import { throwError } from 'redux-saga-test-plan/providers';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import eventSaga from '../../app/sagas/event';
import * as eventActions from '../../app/actions/event';
import * as navActions from '../../app/actions/navigation';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -5,7 +5,7 @@ import Snackbar from 'react-native-snackbar';
import { AsyncStorage } from 'react-native';
import loginSaga, { DISPLAYNAMEKEY, PHOTOKEY, TOKENKEY, USERNAMEKEY } from '../../app/sagas/login';
import { apiRequest } from '../../app/url';
import { apiRequest } from '../../app/utils/url';
import * as loginActions from '../../app/actions/login';
import * as pushNotificationsActions from '../../app/actions/pushNotifications';
......@@ -22,7 +22,7 @@ jest.mock('react-native', () => ({
},
}));
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -2,12 +2,12 @@ import * as matchers from 'redux-saga-test-plan/matchers';
import { select } from 'redux-saga/effects';
import { expectSaga } from 'redux-saga-test-plan';
import { throwError } from 'redux-saga-test-plan/providers';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import pizzaSaga from '../../app/sagas/pizza';
import * as pizzaActions from '../../app/actions/pizza';
import * as navigationActions from '../../app/actions/navigation';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -3,11 +3,11 @@ import { expectSaga } from 'redux-saga-test-plan';
import * as matchers from 'redux-saga-test-plan/matchers';
import { throwError } from 'redux-saga-test-plan/providers';
import profileSaga from '../../app/sagas/profile';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import * as profileActions from '../../app/actions/profile';
import * as navActions from '../../app/actions/navigation';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -4,10 +4,10 @@ import * as matchers from 'redux-saga-test-plan/matchers';
import { Platform } from 'react-native';
import FCM from 'react-native-fcm';
import pushNotificationsSaga from '../../app/sagas/pushNotifications';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import * as pushActions from '../../app/actions/pushNotifications';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(),
tokenSelector: () => 'token',
}));
......
......@@ -5,7 +5,7 @@ import Snackbar from 'react-native-snackbar';
import { select } from 'redux-saga/effects';
import * as registrationActions from '../../app/actions/registration';
import registrationSaga, { eventSelector } from '../../app/sagas/registration';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import * as eventActions from '../../app/actions/event';
import * as navigationActions from '../../app/actions/navigation';
......@@ -15,7 +15,7 @@ jest.mock('react-native-snackbar', () => ({
dismiss: jest.fn(),
}));
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
......@@ -3,10 +3,10 @@ import { expectSaga } from 'redux-saga-test-plan';
import * as matchers from 'redux-saga-test-plan/matchers';
import { throwError } from 'redux-saga-test-plan/providers';
import welcomeSaga from '../../app/sagas/welcome';
import { apiRequest, tokenSelector } from '../../app/url';
import { apiRequest, tokenSelector } from '../../app/utils/url';
import * as welcomeActions from '../../app/actions/welcome';
jest.mock('../../app/url', () => ({
jest.mock('../../app/utils/url', () => ({
apiRequest: jest.fn(() => {}),
tokenSelector: () => 'token',
}));
......
import { StyleSheet as ReactStyleSheet, Platform } from 'react-native';
import { StyleSheet } from '../app/style';
import StyleSheet from '../../../app/ui/style/StyleSheet';
describe('StyleSheet', () => {
it('should create a react stylesheet', () => {
......
import {
url, apiUrl, defaultProfileImage,
tokenSelector, loggedInSelector, apiRequest, ServerError,
} from '../app/url';
} from '../../app/utils/url';
global.fetch = jest.fn().mockReturnValue(
Promise.resolve({ status: 200, json: () => 'responseJson' }));
......
......@@ -11,9 +11,9 @@ import 'moment/locale/nl';
import * as reducers from './reducers';
import i18n from './i18n';
import i18n from './utils/i18n';
import sagas from './sagas';
import ReduxNavigator from './components/navigator';
import ReduxNavigator from './ui/components/navigator/ReduxNavigator';
import * as loginActions from './actions/login';
import * as deepLinkingActions from './actions/deepLinking';
import { register } from './actions/pushNotifications';
......
const files = {};
files['app/ui/screens/user/ProfileNL'] = require('./nl/app/ui/screens/user/Profile.json');
files['app/ui/screens/user/LoginNL'] = require('./nl/app/ui/screens/user/Login.json');
files['app/ui/screens/welcome/WelcomeNL'] = require('./nl/app/ui/screens/welcome/Welcome.json');
files['app/ui/screens/welcome/EventDetailCardNL'] = require('./nl/app/ui/screens/welcome/EventDetailCard.json');
files['app/ui/screens/memberList/MemberListNL'] = require('./nl/app/ui/screens/memberList/MemberList.json');
files['app/ui/screens/events/CalendarItemNL'] = require('./nl/app/ui/screens/events/CalendarItem.json');
files['app/ui/screens/events/EventNL'] = require('./nl/app/ui/screens/events/Event.json');
files['app/ui/screens/events/RegistrationNL'] = require('./nl/app/ui/screens/events/Registration.json');
files['app/ui/screens/events/CalendarNL'] = require('./nl/app/ui/screens/events/Calendar.json');
files['app/ui/screens/pizza/PizzaNL'] = require('./nl/app/ui/screens/pizza/Pizza.json');
files['app/ui/components/standardHeader/StandardHeaderNL'] = require('./nl/app/ui/components/standardHeader/StandardHeader.json');
files['app/ui/components/navigator/SidebarNL'] = require('./nl/app/ui/components/navigator/Sidebar.json');
files['app/ui/components/errorScreen/ErrorScreenNL'] = require('./nl/app/ui/components/errorScreen/ErrorScreen.json');
export default {
nl: {
'screens/user/Profile': files['app/ui/screens/user/ProfileNL'],
'screens/user/Login': files['app/ui/screens/user/LoginNL'],
'screens/welcome/Welcome': files['app/ui/screens/welcome/WelcomeNL'],
'screens/welcome/EventDetailCard': files['app/ui/screens/welcome/EventDetailCardNL'],
'screens/memberList/MemberList': files['app/ui/screens/memberList/MemberListNL'],
'screens/events/CalendarItem': files['app/ui/screens/events/CalendarItemNL'],
'screens/events/Event': files['app/ui/screens/events/EventNL'],
'screens/events/Registration': files['app/ui/screens/events/RegistrationNL'],
'screens/events/Calendar': files['app/ui/screens/events/CalendarNL'],
'screens/pizza/Pizza': files['app/ui/screens/pizza/PizzaNL'],
'components/standardHeader/StandardHeader': files['app/ui/components/standardHeader/StandardHeaderNL'],
'components/navigator/Sidebar': files['app/ui/components/navigator/SidebarNL'],
'components/errorScreen/ErrorScreen': files['app/ui/components/errorScreen/ErrorScreenNL'],
},
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment