From 30fbb2003c41b472bcd9be23c260786fd3eb1d58 Mon Sep 17 00:00:00 2001 From: Robert Eldredge Date: Fri, 26 Oct 2018 15:56:24 -0400 Subject: [PATCH 01/11] upgrade react-native-fbsdk version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9299466541..0162c98a7e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "react-native-default-preference": "^1.3.1", "react-native-device-info": "^0.21.5", "react-native-fabric": "^0.5.1", - "react-native-fbsdk": "^0.7.0", + "react-native-fbsdk": "^0.8.0", "react-native-omniture": "https://github.com/CruGlobal/react-native-omniture", "react-native-parallax-scroll-view": "^0.21.0", "react-native-push-notification": "https://github.com/CruGlobal/react-native-push-notification", From 81c43fa01506a7fd1cfd1840f2fc43633bf836d5 Mon Sep 17 00:00:00 2001 From: Robert Eldredge Date: Mon, 29 Oct 2018 11:17:20 -0400 Subject: [PATCH 02/11] update yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8d20c4634c..3e063e5421 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7243,10 +7243,10 @@ react-native-fabric@^0.5.1: resolved "https://registry.yarnpkg.com/react-native-fabric/-/react-native-fabric-0.5.1.tgz#e5eb65c56196355b41f230c14adcc9c4bcf60dda" integrity sha512-NKYXiH8w/DjNXoozko1twjAd5F8shL/UiTVx/PQ8QNaasWpbxlXgeJ5exhDSIcDXao0AUdcPWJunYdSCjq208g== -react-native-fbsdk@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/react-native-fbsdk/-/react-native-fbsdk-0.7.0.tgz#263dfe5845205de7b80efb0f18ed5c1ded025291" - integrity sha512-wM+S+NGaqn437H6IYebLhBy2612aIXNPPxunvN5SdJVIIQZdGhkdDZUDbZmgmFnMRY3wQpQatzp+vRjEmAcEmg== +react-native-fbsdk@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/react-native-fbsdk/-/react-native-fbsdk-0.8.0.tgz#4ee95ebb7be4b00fa9f871ca594f068c9782c7de" + integrity sha512-odqSTgvXtw9f84iU0THTjK+Z9Lvy14aP5Yd0fdfHCXFpb/Q0WrpwsSyjPFXG1AsWIe+FtpzzgJsjOu6E2xqgMQ== dependencies: adm-zip "^0.4.7" fastfall "^1.5.1" From 48fb7d494f3af2de60e8881d74f0306fe7e63f98 Mon Sep 17 00:00:00 2001 From: Robert Eldredge Date: Mon, 29 Oct 2018 13:51:30 -0400 Subject: [PATCH 03/11] Fix communityIsCru logic --- __tests__/components/GroupsPersonHeader.js | 2 +- .../components/__snapshots__/GroupsPersonHeader.js.snap | 2 +- __tests__/utils/common.js | 3 +++ src/utils/common.js | 5 ++++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/__tests__/components/GroupsPersonHeader.js b/__tests__/components/GroupsPersonHeader.js index a6bc43a7a5..34ac39aa26 100644 --- a/__tests__/components/GroupsPersonHeader.js +++ b/__tests__/components/GroupsPersonHeader.js @@ -246,7 +246,7 @@ describe('isContact', () => { ); }); - it('renders no contact buttons for User-Created Org', () => { + it('renders no contact buttons if not Cru Org', () => { testSnapshotShallow( , ); diff --git a/__tests__/components/__snapshots__/GroupsPersonHeader.js.snap b/__tests__/components/__snapshots__/GroupsPersonHeader.js.snap index 3535590708..976b59fb48 100644 --- a/__tests__/components/__snapshots__/GroupsPersonHeader.js.snap +++ b/__tests__/components/__snapshots__/GroupsPersonHeader.js.snap @@ -64,7 +64,7 @@ exports[`isContact with contact assignment does not render status button if cont `; -exports[`isContact with contact assignment renders no contact buttons for User-Created Org 1`] = ` +exports[`isContact with contact assignment renders no contact buttons if not Cru Org 1`] = ` { }); describe('communityIsCru', () => { + it('returns false for empty org', () => { + expect(communityIsCru({})).toEqual(false); + }); it('returns false for personal ministry', () => { expect(communityIsCru({ id: 'personal' })).toEqual(false); }); diff --git a/src/utils/common.js b/src/utils/common.js index adb05fa952..5896d93e8d 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -72,7 +72,10 @@ export const userIsJean = orgPermissions => orgPermissions.some(p => !p.organization.user_created); export const communityIsCru = organization => - organization && organization.id !== 'personal' && !organization.user_created; + !!organization && + !!organization.id && + organization.id !== 'personal' && + !organization.user_created; const MHUB_PERMISSIONS = [ORG_PERMISSIONS.ADMIN, ORG_PERMISSIONS.USER]; export const isMissionhubUser = orgPermission => From c5f1808c5bd25cae02f7167611499f411ec598ac Mon Sep 17 00:00:00 2001 From: Robert Eldredge Date: Mon, 29 Oct 2018 13:53:13 -0400 Subject: [PATCH 04/11] simplify logic --- src/utils/common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index 5896d93e8d..6f60df79e4 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -72,10 +72,12 @@ export const userIsJean = orgPermissions => orgPermissions.some(p => !p.organization.user_created); export const communityIsCru = organization => - !!organization && - !!organization.id && - organization.id !== 'personal' && - !organization.user_created; + !!( + organization && + organization.id && + organization.id !== 'personal' && + !organization.user_created + ); const MHUB_PERMISSIONS = [ORG_PERMISSIONS.ADMIN, ORG_PERMISSIONS.USER]; export const isMissionhubUser = orgPermission => From bc45acc427ac2dc83913ff06a2ecae94b6b2c34e Mon Sep 17 00:00:00 2001 From: Scotty Waggoner Date: Mon, 29 Oct 2018 15:56:09 -0700 Subject: [PATCH 05/11] Move tests to live near source files --- __tests__/FooterLoading.js | 10 ---- __tests__/Separator.js | 10 ---- __tests__/components/LoadingWheel.js | 8 ---- {__tests__ => src/__tests__}/App.js | 14 +++--- .../__snapshots__/storeMigrations.js.snap | 0 .../__tests__}/storeMigrations.js | 2 +- .../__tests__}/__snapshots__/auth.js.snap | 0 .../__tests__}/__snapshots__/impact.js.snap | 0 .../__tests__}/__snapshots__/journey.js.snap | 0 .../__snapshots__/notifications.js.snap | 0 .../__tests__}/__snapshots__/people.js.snap | 0 .../actions/__tests__}/analytics.js | 4 +- .../actions => src/actions/__tests__}/api.js | 12 ++--- .../actions => src/actions/__tests__}/auth.js | 42 ++++++++--------- .../actions/__tests__}/celebration.js | 11 ++--- .../actions/__tests__}/challenges.js | 20 ++++---- .../actions/__tests__}/facebook.js | 12 ++--- .../actions/__tests__}/impact.js | 6 +-- .../actions/__tests__}/interactions.js | 22 ++++----- .../actions/__tests__}/journey.js | 16 +++---- .../actions/__tests__}/login.js | 18 ++++---- .../actions => src/actions/__tests__}/misc.js | 38 +++++++-------- .../actions/__tests__}/navigation.js | 2 +- .../actions/__tests__}/navigationInit.js | 10 ++-- .../actions/__tests__}/notifications.js | 18 ++++---- .../actions/__tests__}/onboardingProfile.js | 8 ++-- .../actions/__tests__}/organizations.js | 10 ++-- .../actions/__tests__}/people.js | 6 +-- .../actions/__tests__}/person.js | 26 +++++------ .../actions/__tests__}/selectStage.js | 17 +++---- .../actions/__tests__}/steps.js | 26 +++++------ .../actions/__tests__}/surveys.js | 12 ++--- {__tests__/api => src/api/__tests__}/api.js | 7 +-- {__tests__/api => src/api/__tests__}/utils.js | 2 +- .../__tests__}/AssignToMeButton.js | 18 ++++---- .../__snapshots__/AssignToMeButton.js.snap | 0 .../components/Button/__tests__}/Button.js | 6 +-- .../__tests__}/__snapshots__/Button.js.snap | 0 .../components/Card/__tests__}/Card.js | 8 ++-- .../__tests__}/__snapshots__/Card.js.snap | 0 .../CelebrateFeed/__tests__}/CelebrateFeed.js | 9 ++-- .../__snapshots__/CelebrateFeed.js.snap | 0 .../CelebrateItem/__tests__}/CelebrateItem.js | 12 +++-- .../__snapshots__/CelebrateItem.js.snap | 0 .../__tests__}/CenteredIconButtonWithText.js | 5 +- .../CenteredIconButtonWithText.js.snap | 0 .../ChallengeItem/__tests__}/ChallengeItem.js | 7 +-- .../__snapshots__/ChallengeItem.js.snap | 0 .../CommentBox/__tests__}/CommentBox.js | 12 +++-- .../__snapshots__/CommentBox.js.snap | 0 .../ContactItem/__tests__}/ContactItem.js | 5 +- .../__snapshots__/ContactItem.js.snap | 0 .../DateComponent/__tests__}/DateComponent.js | 5 +- .../__snapshots__/DateComponent.js.snap | 0 .../DatePicker/__tests__}/DatePicker.js | 7 +-- .../__snapshots__/DatePicker.js.snap | 0 .../components/Dot/__tests__}/Dot.js | 5 +- .../Dot/__tests__}/__snapshots__/Dot.js.snap | 0 .../__tests__}/EmptyCelebrateFeed.js | 5 +- .../__snapshots__/EmptyCelebrateFeed.js.snap | 0 .../__tests__}/EmptyChallengeFeed.js | 5 +- .../__snapshots__/EmptyChallengeFeed.js.snap | 0 .../FilterItem/__tests__}/FilterItem.js | 6 +-- .../__snapshots__/FilterItem.js.snap | 0 .../FilterList/__tests__}/FilterList.js | 5 +- .../__snapshots__/FilterList.js.snap | 0 .../components/Flex/__tests__}/Flex.js | 6 +-- .../__tests__}/__snapshots__/Flex.js.snap | 0 .../FooterLoading/__tests__/FooterLoading.js | 10 ++++ .../__snapshots__/FooterLoading.js.snap | 0 .../GroupCardItem/__tests__}/GroupCardItem.js | 5 +- .../__snapshots__/GroupCardItem.js.snap | 0 .../__tests__}/GroupMemberItem.js | 5 +- .../__snapshots__/GroupMemberItem.js.snap | 0 .../__tests__}/GroupSurveyItem.js | 5 +- .../__snapshots__/GroupSurveyItem.js.snap | 0 .../__tests__}/GroupsContactItem.js | 8 ++-- .../__snapshots__/GroupsContactItem.js.snap | 0 .../__tests__}/GroupsContactList.js | 5 +- .../__snapshots__/GroupsContactList.js.snap | 0 .../__tests__}/GroupsPersonHeader.js | 30 ++++++------ .../__snapshots__/GroupsPersonHeader.js.snap | 0 .../JourneyItem/__tests__}/JourneyItem.js | 10 ++-- .../__snapshots__/JourneyItem.js.snap | 0 .../LoadMore/__tests__}/LoadMore.js | 5 +- .../__tests__}/__snapshots__/LoadMore.js.snap | 0 .../LoadingWheel/__tests__/LoadingWheel.js | 9 ++++ .../__snapshots__/LoadingWheel.js.snap | 0 .../__tests__}/MFACodeComponent.js | 5 +- .../__snapshots__/MFACodeComponent.js.snap | 0 .../__tests__}/NullStateComponent.js | 5 +- .../__snapshots__/NullStateComponent.js.snap | 0 .../PeopleList/__tests__}/PeopleList.js | 6 +-- .../__snapshots__/PeopleList.js.snap | 0 .../__tests__}/PersonSideMenu.js | 29 ++++++------ .../__snapshots__/PersonSideMenu.js.snap | 0 .../PopupMenu/__tests__}/PopupMenu.android.js | 4 +- .../PopupMenu/__tests__}/PopupMenu.ios.js | 4 +- .../__snapshots__/PopupMenu.android.js.snap | 0 .../__snapshots__/PopupMenu.ios.js.snap | 0 .../RadioButton/__tests__}/RadioButton.js | 6 +-- .../__snapshots__/RadioButton.js.snap | 0 .../RowSwipeable/__tests__}/RowSwipeable.js | 6 +-- .../__snapshots__/RowSwipeable.js.snap | 0 .../SearchList/__tests__}/SearchList.js | 8 ++-- .../__snapshots__/SearchList.js.snap | 0 .../__tests__}/SearchPeopleItem.js | 6 +-- .../__snapshots__/SearchPeopleItem.js.snap | 0 .../Separator/__tests__/Separator.js | 10 ++++ .../__snapshots__/Separator.js.snap | 0 .../SettingsMenu/__tests__}/SettingsMenu.js | 7 ++- .../__snapshots__/SettingsMenu.js.snap | 0 .../__tests__}/ShareSurveyMenu.js | 5 +- .../__snapshots__/ShareSurveyMenu.js.snap | 0 .../StepItem/__tests__}/StepItem.js | 5 +- .../__tests__}/__snapshots__/StepItem.js.snap | 0 .../StepsList/__tests__}/StepsList.js | 6 +-- .../__snapshots__/StepsList.js.snap | 0 .../SwipeTabMenu/__tests__/SwipeTabMenu.js | 3 +- .../components/Text/__tests__}/Text.js | 6 +-- .../__tests__}/__snapshots__/Text.js.snap | 0 .../__tests__}/AddChallengeScreen.js | 5 +- .../__snapshots__/AddChallengeScreen.js.snap | 0 .../__tests__}/AddContactFields.js | 12 +++-- .../__snapshots__/AddContactFields.js.snap | 0 .../__tests__}/AddContactScreen.js | 26 ++++++----- .../__snapshots__/AddContactScreen.js.snap | 0 .../AddStepScreen/__tests__}/AddStepScreen.js | 12 ++--- .../__snapshots__/AddStepScreen.js.snap | 0 .../BackButton/__tests__}/BackButton.js | 9 ++-- .../__snapshots__/BackButton.js.snap | 0 .../__tests__}/CelebrationScreen.js | 11 +++-- .../__snapshots__/CelebrationScreen.js.snap | 0 .../ChallengeFeed/__tests__}/ChallengeFeed.js | 19 ++++---- .../__snapshots__/ChallengeFeed.js.snap | 0 .../__tests__}/ContactActions.js | 9 ++-- .../__snapshots__/ContactActions.js.snap | 0 .../__tests__}/ContactJourney.js | 10 ++-- .../__snapshots__/ContactJourney.js.snap | 0 .../ContactNotes/__tests__}/ContactNotes.js | 16 ++++--- .../__snapshots__/ContactNotes.js.snap | 0 .../ContactSteps/__tests__}/ContactSteps.js | 46 +++++++++---------- .../__snapshots__/ContactSteps.js.snap | 0 .../__tests__}/GetStartedScreen.js | 10 ++-- .../__snapshots__/GetStartedScreen.js.snap | 0 .../__tests__}/AssignedPersonScreen.js | 23 +++++----- .../AssignedPersonScreen.js.snap | 0 .../__tests__}/UnassignedPersonScreen.js | 13 +++--- .../UnassignedPersonScreen.js.snap | 0 .../containers/Groups/__tests__}/Contacts.js | 14 +++--- .../Groups/__tests__}/ContactsFilter.js | 12 ++--- .../Groups/__tests__}/GroupCelebrate.js | 22 ++++----- .../Groups/__tests__}/GroupChallenges.js | 32 ++++++------- .../Groups/__tests__}/GroupScreen.js | 14 ++---- .../Groups/__tests__}/GroupsListScreen.js | 25 +++++----- .../containers/Groups/__tests__}/Members.js | 20 ++++---- .../Groups/__tests__}/OnboardingCard.js | 10 ++-- .../Groups/__tests__}/SurveyContacts.js | 18 ++++---- .../Groups/__tests__}/SurveyContactsFilter.js | 14 +++--- .../__tests__}/SurveyQuestionsFilterScreen.js | 18 ++++---- .../containers/Groups/__tests__}/Surveys.js | 17 +++---- .../__tests__}/__snapshots__/Contacts.js.snap | 0 .../__snapshots__/ContactsFilter.js.snap | 0 .../__snapshots__/GroupCelebrate.js.snap | 0 .../__snapshots__/GroupChallenges.js.snap | 0 .../__snapshots__/GroupScreen.js.snap | 0 .../__snapshots__/GroupsListScreen.js.snap | 0 .../__tests__}/__snapshots__/Members.js.snap | 0 .../__snapshots__/OnboardingCard.js.snap | 0 .../__snapshots__/SurveyContacts.js.snap | 0 .../SurveyContactsFilter.js.snap | 0 .../SurveyQuestionsFilterScreen.js.snap | 0 .../__tests__}/__snapshots__/Surveys.js.snap | 0 .../__tests__}/IconMessageScreen.js | 11 +++-- .../__snapshots__/IconMessageScreen.js.snap | 0 .../ImpactScreen/__tests__}/ImpactScreen.js | 10 ++-- .../__snapshots__/ImpactScreen.js.snap | 0 .../ImpactView/__tests__}/ImpactView.js | 5 +- .../__snapshots__/ImpactView.js.snap | 0 .../__tests__}/KeyLoginScreen.js | 25 +++++----- .../__snapshots__/KeyLoginScreen.js.snap | 0 .../__tests__}/LoginOptionsScreen.js | 11 +++-- .../__snapshots__/LoginOptionsScreen.js.snap | 0 .../LoginScreen/__tests__}/LoginScreen.js | 10 ++-- .../__snapshots__/LoginScreen.js.snap | 0 .../MFACodeScreen/__tests__}/MFACodeScreen.js | 14 +++--- .../__snapshots__/MFACodeScreen.js.snap | 0 .../__tests__}/MemberCelebrate.js | 5 +- .../__snapshots__/MemberCelebrate.js.snap | 0 .../__tests__}/MemberContacts.js | 5 +- .../__snapshots__/MemberContacts.js.snap | 0 .../__tests__}/NotificationOffScreen.js | 18 ++++---- .../NotificationOffScreen.js.snap | 0 .../__tests__}/NotificationPrimerScreen.js | 15 +++--- .../NotificationPrimerScreen.js.snap | 0 .../__tests__}/PathwayStageDisplay.js | 9 ++-- .../__snapshots__/PathwayStageDisplay.js.snap | 0 .../__tests__}/PathwayStageScreen.js | 9 ++-- .../__snapshots__/PathwayStageScreen.js.snap | 0 .../PeopleItem/__tests__}/PeopleItem.js | 23 ++++++---- .../__snapshots__/PeopleItem.js.snap | 0 .../PeopleScreen/__tests__}/PeopleScreen.js | 20 ++++---- .../__snapshots__/PeopleScreen.js.snap | 0 .../SearchPeopleFilterRefineScreen.js | 8 ++-- .../SearchPeopleFilterRefineScreen.js.snap | 0 .../__tests__}/SearchPeopleFilterScreen.js | 8 ++-- .../SearchPeopleFilterScreen.js.snap | 0 .../__tests__}/SearchPeopleScreen.js | 15 +++--- .../__snapshots__/SearchPeopleScreen.js.snap | 0 .../__tests__}/SelectStepScreen.js | 21 ++++----- .../__snapshots__/SelectStepScreen.js.snap | 0 .../SetupScreen/__tests__}/SetupScreen.js | 12 +++-- .../__snapshots__/SetupScreen.js.snap | 0 .../__tests__}/StatusCompleteScreen.js | 9 ++-- .../StatusCompleteScreen.js.snap | 0 .../__tests__}/StatusReasonScreen.js | 13 +++--- .../__snapshots__/StatusReasonScreen.js.snap | 0 .../__tests__}/StatusSelectScreen.js | 19 ++++---- .../__snapshots__/StatusSelectScreen.js.snap | 0 .../__tests__}/StepsScreen.android.js | 7 +-- .../StepsScreen/__tests__}/StepsScreen.js | 34 +++++++------- .../__snapshots__/StepsScreen.android.js.snap | 0 .../__snapshots__/StepsScreen.js.snap | 0 .../WelcomeScreen/__tests__}/WelcomeScreen.js | 15 +++--- .../__snapshots__/WelcomeScreen.js.snap | 0 .../containers/__tests__}/AddSomeoneScreen.js | 10 ++-- .../containers/__tests__}/MainTabs.js | 6 +-- .../__tests__}/PersonSelectStepScreen.js | 6 +-- .../__tests__}/PersonStageScreen.js | 18 ++++---- .../__tests__}/SelectMyStepScreen.js | 4 +- .../__tests__}/SetupPersonScreen.js | 20 ++++---- .../containers/__tests__}/StageScreen.js | 10 ++-- .../__tests__}/StageSuccessScreen.js | 4 +- .../__snapshots__/AddSomeoneScreen.js.snap | 0 .../__tests__}/__snapshots__/MainTabs.js.snap | 0 .../PersonSelectStepScreen.js.snap | 0 .../__snapshots__/PersonStageScreen.js.snap | 0 .../__snapshots__/SelectMyStepScreen.js.snap | 0 .../__snapshots__/SetupPersonScreen.js.snap | 0 .../__snapshots__/StageScreen.js.snap | 0 .../__snapshots__/StageSuccessScreen.js.snap | 0 .../middleware/__tests__}/tracking.js | 16 +++---- .../__tests__}/__snapshots__/impact.js.snap | 0 .../__snapshots__/organizations.js.snap | 0 .../__tests__}/__snapshots__/people.js.snap | 0 .../reducers/__tests__}/analytics.js | 8 ++-- .../reducers/__tests__}/auth.js | 10 ++-- .../reducers/__tests__}/drawer.js | 4 +- .../reducers/__tests__}/groups.js | 4 +- .../reducers/__tests__}/impact.js | 6 +-- .../reducers/__tests__}/journey.js | 4 +- .../reducers/__tests__}/nav.js | 6 +-- .../reducers/__tests__}/notifications.js | 6 +-- .../reducers/__tests__}/organizations.js | 6 +-- .../reducers/__tests__}/people.js | 6 +-- .../reducers/__tests__}/personProfile.js | 6 +-- .../reducers/__tests__}/profile.js | 4 +- .../reducers/__tests__}/steps.js | 6 +-- .../reducers/__tests__}/swipe.js | 6 +-- .../__snapshots__/celebration.js.snap | 0 .../__snapshots__/challenges.js.snap | 0 .../__tests__}/__snapshots__/people.js.snap | 0 .../__tests__}/__snapshots__/steps.js.snap | 0 .../selectors/__tests__}/celebration.js | 2 +- .../selectors/__tests__}/challenges.js | 2 +- .../selectors/__tests__}/organizations.js | 6 +-- .../selectors/__tests__}/people.js | 6 +-- .../selectors/__tests__}/selectorUtils.js | 2 +- .../selectors/__tests__}/steps.js | 2 +- .../__tests__}/__snapshots__/filters.js.snap | 0 .../utils => src/utils/__tests__}/common.js | 4 +- .../utils => src/utils/__tests__}/filters.js | 2 +- .../utils/__tests__}/pagination.js | 4 +- .../utils/__tests__}/promptToAssign.js | 6 +-- 274 files changed, 895 insertions(+), 833 deletions(-) delete mode 100644 __tests__/FooterLoading.js delete mode 100644 __tests__/Separator.js delete mode 100644 __tests__/components/LoadingWheel.js rename {__tests__ => src/__tests__}/App.js (94%) rename {__tests__ => src/__tests__}/__snapshots__/storeMigrations.js.snap (100%) rename {__tests__ => src/__tests__}/storeMigrations.js (87%) rename {__tests__/actions => src/actions/__tests__}/__snapshots__/auth.js.snap (100%) rename {__tests__/actions => src/actions/__tests__}/__snapshots__/impact.js.snap (100%) rename {__tests__/actions => src/actions/__tests__}/__snapshots__/journey.js.snap (100%) rename {__tests__/actions => src/actions/__tests__}/__snapshots__/notifications.js.snap (100%) rename {__tests__/actions => src/actions/__tests__}/__snapshots__/people.js.snap (100%) rename {__tests__/actions => src/actions/__tests__}/analytics.js (99%) rename {__tests__/actions => src/actions/__tests__}/api.js (94%) rename {__tests__/actions => src/actions/__tests__}/auth.js (89%) rename {__tests__/actions => src/actions/__tests__}/celebration.js (91%) rename {__tests__/actions => src/actions/__tests__}/challenges.js (92%) rename {__tests__/actions => src/actions/__tests__}/facebook.js (92%) rename {__tests__/actions => src/actions/__tests__}/impact.js (96%) rename {__tests__/actions => src/actions/__tests__}/interactions.js (89%) rename {__tests__/actions => src/actions/__tests__}/journey.js (95%) rename {__tests__/actions => src/actions/__tests__}/login.js (82%) rename {__tests__/actions => src/actions/__tests__}/misc.js (87%) rename {__tests__/actions => src/actions/__tests__}/navigation.js (98%) rename {__tests__/actions => src/actions/__tests__}/navigationInit.js (93%) rename {__tests__/actions => src/actions/__tests__}/notifications.js (96%) rename {__tests__/actions => src/actions/__tests__}/onboardingProfile.js (94%) rename {__tests__/actions => src/actions/__tests__}/organizations.js (98%) rename {__tests__/actions => src/actions/__tests__}/people.js (96%) rename {__tests__/actions => src/actions/__tests__}/person.js (96%) rename {__tests__/actions => src/actions/__tests__}/selectStage.js (84%) rename {__tests__/actions => src/actions/__tests__}/steps.js (94%) rename {__tests__/actions => src/actions/__tests__}/surveys.js (91%) rename {__tests__/api => src/api/__tests__}/api.js (90%) rename {__tests__/api => src/api/__tests__}/utils.js (99%) rename {__tests__/components => src/components/AssignToMeButton/__tests__}/AssignToMeButton.js (80%) rename {__tests__/components => src/components/AssignToMeButton/__tests__}/__snapshots__/AssignToMeButton.js.snap (100%) rename {__tests__ => src/components/Button/__tests__}/Button.js (88%) rename {__tests__ => src/components/Button/__tests__}/__snapshots__/Button.js.snap (100%) rename {__tests__/components => src/components/Card/__tests__}/Card.js (87%) rename {__tests__/components => src/components/Card/__tests__}/__snapshots__/Card.js.snap (100%) rename {__tests__/components => src/components/CelebrateFeed/__tests__}/CelebrateFeed.js (92%) rename {__tests__/components => src/components/CelebrateFeed/__tests__}/__snapshots__/CelebrateFeed.js.snap (100%) rename {__tests__/components => src/components/CelebrateItem/__tests__}/CelebrateItem.js (95%) rename {__tests__/components => src/components/CelebrateItem/__tests__}/__snapshots__/CelebrateItem.js.snap (100%) rename {__tests__/components => src/components/CenteredIconButtonWithText/__tests__}/CenteredIconButtonWithText.js (79%) rename {__tests__/components => src/components/CenteredIconButtonWithText/__tests__}/__snapshots__/CenteredIconButtonWithText.js.snap (100%) rename {__tests__/components => src/components/ChallengeItem/__tests__}/ChallengeItem.js (94%) rename {__tests__/components => src/components/ChallengeItem/__tests__}/__snapshots__/ChallengeItem.js.snap (100%) rename {__tests__/components => src/components/CommentBox/__tests__}/CommentBox.js (93%) rename {__tests__/components => src/components/CommentBox/__tests__}/__snapshots__/CommentBox.js.snap (100%) rename {__tests__/components => src/components/ContactItem/__tests__}/ContactItem.js (87%) rename {__tests__/components => src/components/ContactItem/__tests__}/__snapshots__/ContactItem.js.snap (100%) rename {__tests__/components => src/components/DateComponent/__tests__}/DateComponent.js (90%) rename {__tests__/components => src/components/DateComponent/__tests__}/__snapshots__/DateComponent.js.snap (100%) rename {__tests__/components => src/components/DatePicker/__tests__}/DatePicker.js (98%) rename {__tests__/components => src/components/DatePicker/__tests__}/__snapshots__/DatePicker.js.snap (100%) rename {__tests__/components => src/components/Dot/__tests__}/Dot.js (65%) rename {__tests__/components => src/components/Dot/__tests__}/__snapshots__/Dot.js.snap (100%) rename {__tests__/components => src/components/EmptyCelebrateFeed/__tests__}/EmptyCelebrateFeed.js (83%) rename {__tests__/components => src/components/EmptyCelebrateFeed/__tests__}/__snapshots__/EmptyCelebrateFeed.js.snap (100%) rename {__tests__/components => src/components/EmptyChallengeFeed/__tests__}/EmptyChallengeFeed.js (67%) rename {__tests__/components => src/components/EmptyChallengeFeed/__tests__}/__snapshots__/EmptyChallengeFeed.js.snap (100%) rename {__tests__ => src/components/FilterItem/__tests__}/FilterItem.js (83%) rename {__tests__ => src/components/FilterItem/__tests__}/__snapshots__/FilterItem.js.snap (100%) rename {__tests__/components => src/components/FilterList/__tests__}/FilterList.js (90%) rename {__tests__/components => src/components/FilterList/__tests__}/__snapshots__/FilterList.js.snap (100%) rename {__tests__ => src/components/Flex/__tests__}/Flex.js (80%) rename {__tests__ => src/components/Flex/__tests__}/__snapshots__/Flex.js.snap (100%) create mode 100644 src/components/FooterLoading/__tests__/FooterLoading.js rename {__tests__ => src/components/FooterLoading/__tests__}/__snapshots__/FooterLoading.js.snap (100%) rename {__tests__/components => src/components/GroupCardItem/__tests__}/GroupCardItem.js (93%) rename {__tests__/components => src/components/GroupCardItem/__tests__}/__snapshots__/GroupCardItem.js.snap (100%) rename {__tests__/components => src/components/GroupMemberItem/__tests__}/GroupMemberItem.js (90%) rename {__tests__/components => src/components/GroupMemberItem/__tests__}/__snapshots__/GroupMemberItem.js.snap (100%) rename {__tests__/components => src/components/GroupSurveyItem/__tests__}/GroupSurveyItem.js (90%) rename {__tests__/components => src/components/GroupSurveyItem/__tests__}/__snapshots__/GroupSurveyItem.js.snap (100%) rename {__tests__/components => src/components/GroupsContactItem/__tests__}/GroupsContactItem.js (94%) rename {__tests__/components => src/components/GroupsContactItem/__tests__}/__snapshots__/GroupsContactItem.js.snap (100%) rename {__tests__/components => src/components/GroupsContactList/__tests__}/GroupsContactList.js (93%) rename {__tests__/components => src/components/GroupsContactList/__tests__}/__snapshots__/GroupsContactList.js.snap (100%) rename {__tests__/components => src/components/GroupsPersonHeader/__tests__}/GroupsPersonHeader.js (90%) rename {__tests__/components => src/components/GroupsPersonHeader/__tests__}/__snapshots__/GroupsPersonHeader.js.snap (100%) rename {__tests__ => src/components/JourneyItem/__tests__}/JourneyItem.js (95%) rename {__tests__ => src/components/JourneyItem/__tests__}/__snapshots__/JourneyItem.js.snap (100%) rename {__tests__/components => src/components/LoadMore/__tests__}/LoadMore.js (71%) rename {__tests__/components => src/components/LoadMore/__tests__}/__snapshots__/LoadMore.js.snap (100%) create mode 100644 src/components/LoadingWheel/__tests__/LoadingWheel.js rename {__tests__/components => src/components/LoadingWheel/__tests__}/__snapshots__/LoadingWheel.js.snap (100%) rename {__tests__/components => src/components/MFACodeComponent/__tests__}/MFACodeComponent.js (91%) rename {__tests__/components => src/components/MFACodeComponent/__tests__}/__snapshots__/MFACodeComponent.js.snap (100%) rename {__tests__/components => src/components/NullStateComponent/__tests__}/NullStateComponent.js (64%) rename {__tests__/components => src/components/NullStateComponent/__tests__}/__snapshots__/NullStateComponent.js.snap (100%) rename {__tests__ => src/components/PeopleList/__tests__}/PeopleList.js (93%) rename {__tests__ => src/components/PeopleList/__tests__}/__snapshots__/PeopleList.js.snap (100%) rename {__tests__/components => src/components/PersonSideMenu/__tests__}/PersonSideMenu.js (88%) rename {__tests__/components => src/components/PersonSideMenu/__tests__}/__snapshots__/PersonSideMenu.js.snap (100%) rename {__tests__/components => src/components/PopupMenu/__tests__}/PopupMenu.android.js (87%) rename {__tests__/components => src/components/PopupMenu/__tests__}/PopupMenu.ios.js (83%) rename {__tests__/components => src/components/PopupMenu/__tests__}/__snapshots__/PopupMenu.android.js.snap (100%) rename {__tests__/components => src/components/PopupMenu/__tests__}/__snapshots__/PopupMenu.ios.js.snap (100%) rename {__tests__ => src/components/RadioButton/__tests__}/RadioButton.js (66%) rename {__tests__ => src/components/RadioButton/__tests__}/__snapshots__/RadioButton.js.snap (100%) rename {__tests__ => src/components/RowSwipeable/__tests__}/RowSwipeable.js (95%) rename {__tests__ => src/components/RowSwipeable/__tests__}/__snapshots__/RowSwipeable.js.snap (100%) rename {__tests__/components => src/components/SearchList/__tests__}/SearchList.js (96%) rename {__tests__/components => src/components/SearchList/__tests__}/__snapshots__/SearchList.js.snap (100%) rename {__tests__ => src/components/SearchPeopleItem/__tests__}/SearchPeopleItem.js (88%) rename {__tests__ => src/components/SearchPeopleItem/__tests__}/__snapshots__/SearchPeopleItem.js.snap (100%) create mode 100644 src/components/Separator/__tests__/Separator.js rename {__tests__ => src/components/Separator/__tests__}/__snapshots__/Separator.js.snap (100%) rename {__tests__ => src/components/SettingsMenu/__tests__}/SettingsMenu.js (50%) rename {__tests__ => src/components/SettingsMenu/__tests__}/__snapshots__/SettingsMenu.js.snap (100%) rename {__tests__/components => src/components/ShareSurveyMenu/__tests__}/ShareSurveyMenu.js (86%) rename {__tests__/components => src/components/ShareSurveyMenu/__tests__}/__snapshots__/ShareSurveyMenu.js.snap (100%) rename {__tests__/containers => src/components/StepItem/__tests__}/StepItem.js (96%) rename {__tests__/containers => src/components/StepItem/__tests__}/__snapshots__/StepItem.js.snap (100%) rename {__tests__/components => src/components/StepsList/__tests__}/StepsList.js (82%) rename {__tests__/components => src/components/StepsList/__tests__}/__snapshots__/StepsList.js.snap (100%) rename {__tests__ => src/components/Text/__tests__}/Text.js (73%) rename {__tests__ => src/components/Text/__tests__}/__snapshots__/Text.js.snap (100%) rename {__tests__/containers => src/containers/AddChallengeScreen/__tests__}/AddChallengeScreen.js (97%) rename {__tests__/containers => src/containers/AddChallengeScreen/__tests__}/__snapshots__/AddChallengeScreen.js.snap (100%) rename {__tests__/containers => src/containers/AddContactFields/__tests__}/AddContactFields.js (96%) rename {__tests__/containers => src/containers/AddContactFields/__tests__}/__snapshots__/AddContactFields.js.snap (100%) rename {__tests__/containers => src/containers/AddContactScreen/__tests__}/AddContactScreen.js (93%) rename {__tests__/containers => src/containers/AddContactScreen/__tests__}/__snapshots__/AddContactScreen.js.snap (100%) rename {__tests__/containers => src/containers/AddStepScreen/__tests__}/AddStepScreen.js (94%) rename {__tests__/containers => src/containers/AddStepScreen/__tests__}/__snapshots__/AddStepScreen.js.snap (100%) rename {__tests__/containers => src/containers/BackButton/__tests__}/BackButton.js (88%) rename {__tests__/containers => src/containers/BackButton/__tests__}/__snapshots__/BackButton.js.snap (100%) rename {__tests__/containers => src/containers/CelebrationScreen/__tests__}/CelebrationScreen.js (87%) rename {__tests__/containers => src/containers/CelebrationScreen/__tests__}/__snapshots__/CelebrationScreen.js.snap (100%) rename {__tests__/containers => src/containers/ChallengeFeed/__tests__}/ChallengeFeed.js (91%) rename {__tests__/containers => src/containers/ChallengeFeed/__tests__}/__snapshots__/ChallengeFeed.js.snap (100%) rename {__tests__/containers => src/containers/ContactActions/__tests__}/ContactActions.js (87%) rename {__tests__/containers => src/containers/ContactActions/__tests__}/__snapshots__/ContactActions.js.snap (100%) rename {__tests__/containers => src/containers/ContactJourney/__tests__}/ContactJourney.js (96%) rename {__tests__/containers => src/containers/ContactJourney/__tests__}/__snapshots__/ContactJourney.js.snap (100%) rename {__tests__/containers => src/containers/ContactNotes/__tests__}/ContactNotes.js (89%) rename {__tests__/containers => src/containers/ContactNotes/__tests__}/__snapshots__/ContactNotes.js.snap (100%) rename {__tests__/containers => src/containers/ContactSteps/__tests__}/ContactSteps.js (81%) rename {__tests__/containers => src/containers/ContactSteps/__tests__}/__snapshots__/ContactSteps.js.snap (100%) rename {__tests__/containers => src/containers/GetStartedScreen/__tests__}/GetStartedScreen.js (83%) rename {__tests__/containers => src/containers/GetStartedScreen/__tests__}/__snapshots__/GetStartedScreen.js.snap (100%) rename {__tests__/containers/Groups/PersonScreen => src/containers/Groups/AssignedPersonScreen/__tests__}/AssignedPersonScreen.js (89%) rename {__tests__/containers/Groups/PersonScreen => src/containers/Groups/AssignedPersonScreen/__tests__}/__snapshots__/AssignedPersonScreen.js.snap (100%) rename {__tests__/containers/Groups/PersonScreen => src/containers/Groups/UnassignedPersonScreen/__tests__}/UnassignedPersonScreen.js (80%) rename {__tests__/containers/Groups/PersonScreen => src/containers/Groups/UnassignedPersonScreen/__tests__}/__snapshots__/UnassignedPersonScreen.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/Contacts.js (89%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/ContactsFilter.js (84%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/GroupCelebrate.js (80%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/GroupChallenges.js (80%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/GroupScreen.js (80%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/GroupsListScreen.js (82%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/Members.js (90%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/OnboardingCard.js (94%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/SurveyContacts.js (86%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/SurveyContactsFilter.js (83%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/SurveyQuestionsFilterScreen.js (82%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/Surveys.js (87%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/Contacts.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/ContactsFilter.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/GroupCelebrate.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/GroupChallenges.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/GroupScreen.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/GroupsListScreen.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/Members.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/OnboardingCard.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/SurveyContacts.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/SurveyContactsFilter.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/SurveyQuestionsFilterScreen.js.snap (100%) rename {__tests__/containers/Groups => src/containers/Groups/__tests__}/__snapshots__/Surveys.js.snap (100%) rename {__tests__/containers => src/containers/IconMessageScreen/__tests__}/IconMessageScreen.js (72%) rename {__tests__/containers => src/containers/IconMessageScreen/__tests__}/__snapshots__/IconMessageScreen.js.snap (100%) rename {__tests__/containers => src/containers/ImpactScreen/__tests__}/ImpactScreen.js (80%) rename {__tests__/containers => src/containers/ImpactScreen/__tests__}/__snapshots__/ImpactScreen.js.snap (100%) rename {__tests__/containers => src/containers/ImpactView/__tests__}/ImpactView.js (99%) rename {__tests__/containers => src/containers/ImpactView/__tests__}/__snapshots__/ImpactView.js.snap (100%) rename {__tests__/containers => src/containers/KeyLoginScreen/__tests__}/KeyLoginScreen.js (90%) rename {__tests__/containers => src/containers/KeyLoginScreen/__tests__}/__snapshots__/KeyLoginScreen.js.snap (100%) rename {__tests__/containers => src/containers/LoginOptionsScreen/__tests__}/LoginOptionsScreen.js (93%) rename {__tests__/containers => src/containers/LoginOptionsScreen/__tests__}/__snapshots__/LoginOptionsScreen.js.snap (100%) rename {__tests__/containers => src/containers/LoginScreen/__tests__}/LoginScreen.js (86%) rename {__tests__/containers => src/containers/LoginScreen/__tests__}/__snapshots__/LoginScreen.js.snap (100%) rename {__tests__/containers => src/containers/MFACodeScreen/__tests__}/MFACodeScreen.js (87%) rename {__tests__/containers => src/containers/MFACodeScreen/__tests__}/__snapshots__/MFACodeScreen.js.snap (100%) rename {__tests__/containers => src/containers/MemberCelebrate/__tests__}/MemberCelebrate.js (92%) rename {__tests__/containers => src/containers/MemberCelebrate/__tests__}/__snapshots__/MemberCelebrate.js.snap (100%) rename {__tests__/containers => src/containers/MemberContacts/__tests__}/MemberContacts.js (92%) rename {__tests__/containers => src/containers/MemberContacts/__tests__}/__snapshots__/MemberContacts.js.snap (100%) rename {__tests__/containers => src/containers/NotificationOffScreen/__tests__}/NotificationOffScreen.js (73%) rename {__tests__/containers => src/containers/NotificationOffScreen/__tests__}/__snapshots__/NotificationOffScreen.js.snap (100%) rename {__tests__/containers => src/containers/NotificationPrimerScreen/__tests__}/NotificationPrimerScreen.js (87%) rename {__tests__/containers => src/containers/NotificationPrimerScreen/__tests__}/__snapshots__/NotificationPrimerScreen.js.snap (100%) rename {__tests__/containers => src/containers/PathwayStageDisplay/__tests__}/PathwayStageDisplay.js (92%) rename {__tests__/containers => src/containers/PathwayStageDisplay/__tests__}/__snapshots__/PathwayStageDisplay.js.snap (100%) rename {__tests__/containers => src/containers/PathwayStageScreen/__tests__}/PathwayStageScreen.js (90%) rename {__tests__/containers => src/containers/PathwayStageScreen/__tests__}/__snapshots__/PathwayStageScreen.js.snap (100%) rename {__tests__/containers => src/containers/PeopleItem/__tests__}/PeopleItem.js (91%) rename {__tests__/containers => src/containers/PeopleItem/__tests__}/__snapshots__/PeopleItem.js.snap (100%) rename {__tests__/containers => src/containers/PeopleScreen/__tests__}/PeopleScreen.js (83%) rename {__tests__/containers => src/containers/PeopleScreen/__tests__}/__snapshots__/PeopleScreen.js.snap (100%) rename {__tests__/containers => src/containers/SearchPeopleFilterRefineScreen/__tests__}/SearchPeopleFilterRefineScreen.js (80%) rename {__tests__/containers => src/containers/SearchPeopleFilterRefineScreen/__tests__}/__snapshots__/SearchPeopleFilterRefineScreen.js.snap (100%) rename {__tests__/containers => src/containers/SearchPeopleFilterScreen/__tests__}/SearchPeopleFilterScreen.js (77%) rename {__tests__/containers => src/containers/SearchPeopleFilterScreen/__tests__}/__snapshots__/SearchPeopleFilterScreen.js.snap (100%) rename {__tests__/containers => src/containers/SearchPeopleScreen/__tests__}/SearchPeopleScreen.js (92%) rename {__tests__/containers => src/containers/SearchPeopleScreen/__tests__}/__snapshots__/SearchPeopleScreen.js.snap (100%) rename {__tests__/containers => src/containers/SelectStepScreen/__tests__}/SelectStepScreen.js (92%) rename {__tests__/containers => src/containers/SelectStepScreen/__tests__}/__snapshots__/SelectStepScreen.js.snap (100%) rename {__tests__/containers => src/containers/SetupScreen/__tests__}/SetupScreen.js (82%) rename {__tests__/containers => src/containers/SetupScreen/__tests__}/__snapshots__/SetupScreen.js.snap (100%) rename {__tests__/containers => src/containers/StatusCompleteScreen/__tests__}/StatusCompleteScreen.js (85%) rename {__tests__/containers => src/containers/StatusCompleteScreen/__tests__}/__snapshots__/StatusCompleteScreen.js.snap (100%) rename {__tests__/containers => src/containers/StatusReasonScreen/__tests__}/StatusReasonScreen.js (87%) rename {__tests__/containers => src/containers/StatusReasonScreen/__tests__}/__snapshots__/StatusReasonScreen.js.snap (100%) rename {__tests__/containers => src/containers/StatusSelectScreen/__tests__}/StatusSelectScreen.js (87%) rename {__tests__/containers => src/containers/StatusSelectScreen/__tests__}/__snapshots__/StatusSelectScreen.js.snap (100%) rename {__tests__/containers => src/containers/StepsScreen/__tests__}/StepsScreen.android.js (83%) rename {__tests__/containers => src/containers/StepsScreen/__tests__}/StepsScreen.js (92%) rename {__tests__/containers => src/containers/StepsScreen/__tests__}/__snapshots__/StepsScreen.android.js.snap (100%) rename {__tests__/containers => src/containers/StepsScreen/__tests__}/__snapshots__/StepsScreen.js.snap (100%) rename {__tests__/containers => src/containers/WelcomeScreen/__tests__}/WelcomeScreen.js (76%) rename {__tests__/containers => src/containers/WelcomeScreen/__tests__}/__snapshots__/WelcomeScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/AddSomeoneScreen.js (70%) rename {__tests__ => src/containers/__tests__}/MainTabs.js (85%) rename {__tests__/containers => src/containers/__tests__}/PersonSelectStepScreen.js (88%) rename {__tests__/containers => src/containers/__tests__}/PersonStageScreen.js (89%) rename {__tests__/containers => src/containers/__tests__}/SelectMyStepScreen.js (91%) rename {__tests__/containers => src/containers/__tests__}/SetupPersonScreen.js (85%) rename {__tests__/containers => src/containers/__tests__}/StageScreen.js (92%) rename {__tests__/containers => src/containers/__tests__}/StageSuccessScreen.js (88%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/AddSomeoneScreen.js.snap (100%) rename {__tests__ => src/containers/__tests__}/__snapshots__/MainTabs.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/PersonSelectStepScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/PersonStageScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/SelectMyStepScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/SetupPersonScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/StageScreen.js.snap (100%) rename {__tests__/containers => src/containers/__tests__}/__snapshots__/StageSuccessScreen.js.snap (100%) rename {__tests__/middleware => src/middleware/__tests__}/tracking.js (87%) rename {__tests__/reducers => src/reducers/__tests__}/__snapshots__/impact.js.snap (100%) rename {__tests__/reducers => src/reducers/__tests__}/__snapshots__/organizations.js.snap (100%) rename {__tests__/reducers => src/reducers/__tests__}/__snapshots__/people.js.snap (100%) rename {__tests__/reducers => src/reducers/__tests__}/analytics.js (90%) rename {__tests__/reducers => src/reducers/__tests__}/auth.js (92%) rename {__tests__/reducers => src/reducers/__tests__}/drawer.js (85%) rename {__tests__/reducers => src/reducers/__tests__}/groups.js (82%) rename {__tests__/reducers => src/reducers/__tests__}/impact.js (92%) rename {__tests__/reducers => src/reducers/__tests__}/journey.js (93%) rename {__tests__/reducers => src/reducers/__tests__}/nav.js (75%) rename {__tests__/reducers => src/reducers/__tests__}/notifications.js (91%) rename {__tests__/reducers => src/reducers/__tests__}/organizations.js (99%) rename {__tests__/reducers => src/reducers/__tests__}/people.js (97%) rename {__tests__/reducers => src/reducers/__tests__}/personProfile.js (94%) rename {__tests__/reducers => src/reducers/__tests__}/profile.js (85%) rename {__tests__/reducers => src/reducers/__tests__}/steps.js (96%) rename {__tests__/reducers => src/reducers/__tests__}/swipe.js (94%) rename {__tests__/selectors => src/selectors/__tests__}/__snapshots__/celebration.js.snap (100%) rename {__tests__/selectors => src/selectors/__tests__}/__snapshots__/challenges.js.snap (100%) rename {__tests__/selectors => src/selectors/__tests__}/__snapshots__/people.js.snap (100%) rename {__tests__/selectors => src/selectors/__tests__}/__snapshots__/steps.js.snap (100%) rename {__tests__/selectors => src/selectors/__tests__}/celebration.js (97%) rename {__tests__/selectors => src/selectors/__tests__}/challenges.js (95%) rename {__tests__/selectors => src/selectors/__tests__}/organizations.js (91%) rename {__tests__/selectors => src/selectors/__tests__}/people.js (97%) rename {__tests__/selectors => src/selectors/__tests__}/selectorUtils.js (85%) rename {__tests__/selectors => src/selectors/__tests__}/steps.js (98%) rename {__tests__/utils => src/utils/__tests__}/__snapshots__/filters.js.snap (100%) rename {__tests__/utils => src/utils/__tests__}/common.js (99%) rename {__tests__/utils => src/utils/__tests__}/filters.js (99%) rename {__tests__/utils => src/utils/__tests__}/pagination.js (83%) rename {__tests__/utils => src/utils/__tests__}/promptToAssign.js (90%) diff --git a/__tests__/FooterLoading.js b/__tests__/FooterLoading.js deleted file mode 100644 index d37ee56b55..0000000000 --- a/__tests__/FooterLoading.js +++ /dev/null @@ -1,10 +0,0 @@ -import 'react-native'; -import React from 'react'; - -// Note: test renderer must be required after react-native. -import FooterLoading from '../src/components/FooterLoading'; -import { testSnapshot } from '../testUtils'; - -it('renders correctly', () => { - testSnapshot(); -}); diff --git a/__tests__/Separator.js b/__tests__/Separator.js deleted file mode 100644 index b44ad0fb24..0000000000 --- a/__tests__/Separator.js +++ /dev/null @@ -1,10 +0,0 @@ -import 'react-native'; -import React from 'react'; - -// Note: test renderer must be required after react-native. -import { Separator } from '../src/components/common'; -import { testSnapshot } from '../testUtils'; - -it('renders correctly', () => { - testSnapshot(); -}); diff --git a/__tests__/components/LoadingWheel.js b/__tests__/components/LoadingWheel.js deleted file mode 100644 index 18bf3cf535..0000000000 --- a/__tests__/components/LoadingWheel.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; - -import { testSnapshotShallow } from '../../testUtils'; -import LoadingWheel from '../../src/components/LoadingWheel'; - -it('renders correctly', () => { - testSnapshotShallow(); -}); diff --git a/__tests__/App.js b/src/__tests__/App.js similarity index 94% rename from __tests__/App.js rename to src/__tests__/App.js index 1aa63c093f..15f2d671b7 100644 --- a/__tests__/App.js +++ b/src/__tests__/App.js @@ -6,19 +6,19 @@ import Enzyme from 'enzyme/build/index'; import { Crashlytics } from 'react-native-fabric'; import StackTrace from 'stacktrace-js'; -import App from '../src/App'; +import App from '../App'; import { EXPIRED_ACCESS_TOKEN, INVALID_ACCESS_TOKEN, INVALID_GRANT, NETWORK_REQUEST_FAILED, -} from '../src/constants'; -import * as auth from '../src/actions/auth'; -import locale from '../src/i18n/locales/en-US'; +} from '../constants'; +import * as auth from '../actions/auth'; +import locale from '../i18n/locales/en-US'; Enzyme.configure({ adapter: new Adapter() }); -jest.mock('../src/AppNavigator', () => ({ AppNavigator: 'mockAppNavigator' })); +jest.mock('../AppNavigator', () => ({ AppNavigator: 'mockAppNavigator' })); jest.mock('react-native-default-preference', () => ({ get: jest.fn().mockReturnValue(Promise.reject()), @@ -35,8 +35,8 @@ jest.mock('react-navigation-redux-helpers', () => ({ jest.mock('stacktrace-js'); -jest.mock('../src/store', () => ({ - store: require('../testUtils').createMockStore(), +jest.mock('../store', () => ({ + store: require('../../testUtils').createMockStore(), persistor: {}, })); diff --git a/__tests__/__snapshots__/storeMigrations.js.snap b/src/__tests__/__snapshots__/storeMigrations.js.snap similarity index 100% rename from __tests__/__snapshots__/storeMigrations.js.snap rename to src/__tests__/__snapshots__/storeMigrations.js.snap diff --git a/__tests__/storeMigrations.js b/src/__tests__/storeMigrations.js similarity index 87% rename from __tests__/storeMigrations.js rename to src/__tests__/storeMigrations.js index 9017a52a9c..6ac3962ea6 100644 --- a/__tests__/storeMigrations.js +++ b/src/__tests__/storeMigrations.js @@ -1,4 +1,4 @@ -import { migrations } from '../src/storeMigrations'; +import { migrations } from '../storeMigrations'; it('should migrate impact reducer to use summary key', () => { expect( diff --git a/__tests__/actions/__snapshots__/auth.js.snap b/src/actions/__tests__/__snapshots__/auth.js.snap similarity index 100% rename from __tests__/actions/__snapshots__/auth.js.snap rename to src/actions/__tests__/__snapshots__/auth.js.snap diff --git a/__tests__/actions/__snapshots__/impact.js.snap b/src/actions/__tests__/__snapshots__/impact.js.snap similarity index 100% rename from __tests__/actions/__snapshots__/impact.js.snap rename to src/actions/__tests__/__snapshots__/impact.js.snap diff --git a/__tests__/actions/__snapshots__/journey.js.snap b/src/actions/__tests__/__snapshots__/journey.js.snap similarity index 100% rename from __tests__/actions/__snapshots__/journey.js.snap rename to src/actions/__tests__/__snapshots__/journey.js.snap diff --git a/__tests__/actions/__snapshots__/notifications.js.snap b/src/actions/__tests__/__snapshots__/notifications.js.snap similarity index 100% rename from __tests__/actions/__snapshots__/notifications.js.snap rename to src/actions/__tests__/__snapshots__/notifications.js.snap diff --git a/__tests__/actions/__snapshots__/people.js.snap b/src/actions/__tests__/__snapshots__/people.js.snap similarity index 100% rename from __tests__/actions/__snapshots__/people.js.snap rename to src/actions/__tests__/__snapshots__/people.js.snap diff --git a/__tests__/actions/analytics.js b/src/actions/__tests__/analytics.js similarity index 99% rename from __tests__/actions/analytics.js rename to src/actions/__tests__/analytics.js index 9221ac20d3..11f70f0b29 100644 --- a/__tests__/actions/analytics.js +++ b/src/actions/__tests__/analytics.js @@ -12,14 +12,14 @@ import { trackActionWithoutData, trackSearchFilter, emitterCallback, -} from '../../src/actions/analytics'; +} from '../analytics'; import { ACTIONS, ANALYTICS, ANALYTICS_CONTEXT_CHANGED, CUSTOM_STEP_TYPE, LOGGED_IN, -} from '../../src/constants'; +} from '../../constants'; const mockTracker = { trackScreenView: jest.fn(), diff --git a/__tests__/actions/api.js b/src/actions/__tests__/api.js similarity index 94% rename from __tests__/actions/api.js rename to src/actions/__tests__/api.js index 1ee9a5fdf0..4391293bc4 100644 --- a/__tests__/actions/api.js +++ b/src/actions/__tests__/api.js @@ -1,17 +1,17 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import API_CALLS from '../../src/api'; +import callApi, { REQUESTS } from '../api'; +import API_CALLS from '../../api'; import { EXPIRED_ACCESS_TOKEN, INVALID_ACCESS_TOKEN, INVALID_GRANT, UPDATE_TOKEN, -} from '../../src/constants'; -import { mockFnWithParams } from '../../testUtils'; -import * as auth from '../../src/actions/auth'; -import * as facebook from '../../src/actions/facebook'; +} from '../../constants'; +import { mockFnWithParams } from '../../../testUtils'; +import * as auth from '../auth'; +import * as facebook from '../facebook'; const token = 'alsnjfjwqfpuqfeownposfnjnsaobjfaslkklnsfd'; const refreshToken = 'refresh'; diff --git a/__tests__/actions/auth.js b/src/actions/__tests__/auth.js similarity index 89% rename from __tests__/actions/auth.js rename to src/actions/__tests__/auth.js index 5b0f43b213..72f1f64625 100644 --- a/__tests__/actions/auth.js +++ b/src/actions/__tests__/auth.js @@ -4,17 +4,17 @@ import i18next from 'i18next'; import MockDate from 'mockdate'; import { Linking } from 'react-native'; -import * as callApi from '../../src/actions/api'; -import * as constants from '../../src/constants'; -import { REQUESTS } from '../../src/actions/api'; -import * as navigation from '../../src/actions/navigation'; -import * as login from '../../src/actions/login'; -import * as auth from '../../src/actions/auth'; -import * as person from '../../src/actions/person'; -import * as organizations from '../../src/actions/organizations'; -import * as stages from '../../src/actions/stages'; -import * as steps from '../../src/actions/steps'; -import * as notifications from '../../src/actions/notifications'; +import * as callApi from '../api'; +import { REQUESTS } from '../api'; +import * as constants from '../../constants'; +import * as navigation from '../navigation'; +import * as login from '../login'; +import * as auth from '../auth'; +import * as person from '../person'; +import * as organizations from '../organizations'; +import * as stages from '../stages'; +import * as steps from '../steps'; +import * as notifications from '../notifications'; import { keyLogin, refreshAccessToken, @@ -23,16 +23,16 @@ import { logout, upgradeAccount, openKeyURL, -} from '../../src/actions/auth'; -import { mockFnWithParams } from '../../testUtils'; -import { LOGIN_OPTIONS_SCREEN } from '../../src/containers/LoginOptionsScreen'; -import { OPEN_URL } from '../../src/constants'; -import { getTimezoneString } from '../../src/actions/auth'; -import { refreshAnonymousLogin } from '../../src/actions/auth'; -import { deletePushToken } from '../../src/actions/notifications'; -import * as onboardingProfile from '../../src/actions/onboardingProfile'; - -jest.mock('../../src/actions/notifications'); +} from '../auth'; +import { mockFnWithParams } from '../../../testUtils'; +import { LOGIN_OPTIONS_SCREEN } from '../../containers/LoginOptionsScreen'; +import { OPEN_URL } from '../../constants'; +import { getTimezoneString } from '../auth'; +import { refreshAnonymousLogin } from '../auth'; +import { deletePushToken } from '../notifications'; +import * as onboardingProfile from '../onboardingProfile'; + +jest.mock('../../actions/notifications'); const email = 'klas&jflk@lkjasdf.com'; const password = 'this&is=unsafe'; diff --git a/__tests__/actions/celebration.js b/src/actions/__tests__/celebration.js similarity index 91% rename from __tests__/actions/celebration.js rename to src/actions/__tests__/celebration.js index f4663d4599..c8648e1eb7 100644 --- a/__tests__/actions/celebration.js +++ b/src/actions/__tests__/celebration.js @@ -1,17 +1,14 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { - getGroupCelebrateFeed, - toggleLike, -} from '../../src/actions/celebration'; -import callApi, { REQUESTS } from '../../src/actions/api'; +import { getGroupCelebrateFeed, toggleLike } from '../celebration'; +import callApi, { REQUESTS } from '../api'; import { DEFAULT_PAGE_LIMIT, RESET_CELEBRATION_PAGINATION, -} from '../../src/constants'; +} from '../../constants'; -jest.mock('../../src/actions/api'); +jest.mock('../api'); const orgId = '123'; diff --git a/__tests__/actions/challenges.js b/src/actions/__tests__/challenges.js similarity index 92% rename from __tests__/actions/challenges.js rename to src/actions/__tests__/challenges.js index dbd4e81977..de6182ae47 100644 --- a/__tests__/actions/challenges.js +++ b/src/actions/__tests__/challenges.js @@ -8,20 +8,20 @@ import { joinChallenge, createChallenge, updateChallenge, -} from '../../src/actions/challenges'; -import { reloadGroupCelebrateFeed } from '../../src/actions/celebration'; -import callApi, { REQUESTS } from '../../src/actions/api'; +} from '../challenges'; +import { reloadGroupCelebrateFeed } from '../celebration'; +import callApi, { REQUESTS } from '../api'; import { DEFAULT_PAGE_LIMIT, RESET_CHALLENGE_PAGINATION, -} from '../../src/constants'; -import { CELEBRATION_SCREEN } from '../../src/containers/CelebrationScreen'; -import * as common from '../../src/utils/common'; -import { navigatePush } from '../../src/actions/navigation'; +} from '../../constants'; +import { CELEBRATION_SCREEN } from '../../containers/CelebrationScreen'; +import * as common from '../../utils/common'; +import { navigatePush } from '../navigation'; -jest.mock('../../src/actions/api'); -jest.mock('../../src/actions/navigation'); -jest.mock('../../src/actions/celebration'); +jest.mock('../api'); +jest.mock('../navigation'); +jest.mock('../celebration'); const fakeDate = '2018-09-06T14:13:21Z'; common.formatApiDate = jest.fn(() => fakeDate); diff --git a/__tests__/actions/facebook.js b/src/actions/__tests__/facebook.js similarity index 92% rename from __tests__/actions/facebook.js rename to src/actions/__tests__/facebook.js index 4674137300..8d8c5740f7 100644 --- a/__tests__/actions/facebook.js +++ b/src/actions/__tests__/facebook.js @@ -2,16 +2,16 @@ import { AccessToken, LoginManager } from 'react-native-fbsdk'; import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { mockFnWithParams } from '../../testUtils'; -import { REQUESTS } from '../../src/actions/api'; -import * as callApi from '../../src/actions/api'; -import { ANALYTICS } from '../../src/constants'; -import * as analytics from '../../src/actions/analytics'; +import { mockFnWithParams } from '../../../testUtils'; +import { REQUESTS } from '../api'; +import * as callApi from '../api'; +import { ANALYTICS } from '../../constants'; +import * as analytics from '../analytics'; import { facebookLoginAction, facebookLoginWithUsernamePassword, refreshMissionHubFacebookAccess, -} from '../../src/actions/facebook'; +} from '../facebook'; const mockStore = configureStore([thunk]); diff --git a/__tests__/actions/impact.js b/src/actions/__tests__/impact.js similarity index 96% rename from __tests__/actions/impact.js rename to src/actions/__tests__/impact.js index 8e469d1b26..1f896e853c 100644 --- a/__tests__/actions/impact.js +++ b/src/actions/__tests__/impact.js @@ -5,10 +5,10 @@ import { getImpactSummary, getPeopleInteractionsReport, refreshImpact, -} from '../../src/actions/impact'; -import callApi, { REQUESTS } from '../../src/actions/api'; +} from '../impact'; +import callApi, { REQUESTS } from '../api'; -jest.mock('../../src/actions/api'); +jest.mock('../api'); const store = configureStore([thunk])(); diff --git a/__tests__/actions/interactions.js b/src/actions/__tests__/interactions.js similarity index 89% rename from __tests__/actions/interactions.js rename to src/actions/__tests__/interactions.js index 4c03004fdb..6b5e8f0989 100644 --- a/__tests__/actions/interactions.js +++ b/src/actions/__tests__/interactions.js @@ -1,20 +1,20 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { addNewInteraction, editComment } from '../../src/actions/interactions'; -import * as api from '../../src/actions/api'; -import { REQUESTS } from '../../src/actions/api'; -import * as analytics from '../../src/actions/analytics'; -import * as impact from '../../src/actions/impact'; -import { mockFnWithParams } from '../../testUtils'; -import { ACTIONS, INTERACTION_TYPES } from '../../src/constants'; -import { reloadGroupCelebrateFeed } from '../../src/actions/celebration'; -import { reloadJourney } from '../../src/actions/journey'; +import { addNewInteraction, editComment } from '../interactions'; +import * as api from '../api'; +import { REQUESTS } from '../api'; +import * as analytics from '../analytics'; +import * as impact from '../impact'; +import { mockFnWithParams } from '../../../testUtils'; +import { ACTIONS, INTERACTION_TYPES } from '../../constants'; +import { reloadGroupCelebrateFeed } from '../celebration'; +import { reloadJourney } from '../journey'; let store; -jest.mock('../../src/actions/celebration'); -jest.mock('../../src/actions/journey'); +jest.mock('../celebration'); +jest.mock('../journey'); const mockApi = (result, ...expectedParams) => mockFnWithParams(api, 'default', result, ...expectedParams); diff --git a/__tests__/actions/journey.js b/src/actions/__tests__/journey.js similarity index 95% rename from __tests__/actions/journey.js rename to src/actions/__tests__/journey.js index 6cb2e68d6b..b824af2c8c 100644 --- a/__tests__/actions/journey.js +++ b/src/actions/__tests__/journey.js @@ -1,16 +1,12 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import { - getJourney, - reloadJourney, - getGroupJourney, -} from '../../src/actions/journey'; -import { isAdminForOrg } from '../../src/utils/common'; - -jest.mock('../../src/actions/api'); -jest.mock('../../src/utils/common'); +import callApi, { REQUESTS } from '../api'; +import { getJourney, reloadJourney, getGroupJourney } from '../journey'; +import { isAdminForOrg } from '../../utils/common'; + +jest.mock('../api'); +jest.mock('../../utils/common'); Date = jest.fn(() => ({ toISOString: () => '2018-04-17T00:00:00Z', diff --git a/__tests__/actions/login.js b/src/actions/__tests__/login.js similarity index 82% rename from __tests__/actions/login.js rename to src/actions/__tests__/login.js index 01accb327f..15329253a8 100644 --- a/__tests__/actions/login.js +++ b/src/actions/__tests__/login.js @@ -3,15 +3,15 @@ import thunk from 'redux-thunk'; import { Crashlytics } from 'react-native-fabric'; import * as RNOmniture from 'react-native-omniture'; -import * as person from '../../src/actions/person'; -import * as navigation from '../../src/actions/navigation'; -import { onSuccessfulLogin } from '../../src/actions/login'; -import { mockFnWithParams } from '../../testUtils'; -import * as analytics from '../../src/actions/analytics'; -import { ADD_SOMEONE_SCREEN } from '../../src/containers/AddSomeoneScreen'; -import { GET_STARTED_SCREEN } from '../../src/containers/GetStartedScreen'; -import { MAIN_TABS, ACTIONS } from '../../src/constants'; -import * as onboardingProfile from '../../src/actions/onboardingProfile'; +import * as person from '../person'; +import * as navigation from '../navigation'; +import { onSuccessfulLogin } from '../login'; +import { mockFnWithParams } from '../../../testUtils'; +import * as analytics from '../analytics'; +import { ADD_SOMEONE_SCREEN } from '../../containers/AddSomeoneScreen'; +import { GET_STARTED_SCREEN } from '../../containers/GetStartedScreen'; +import { MAIN_TABS, ACTIONS } from '../../constants'; +import * as onboardingProfile from '../onboardingProfile'; const mockStore = configureStore([thunk]); const personId = '593348'; diff --git a/__tests__/actions/misc.js b/src/actions/__tests__/misc.js similarity index 87% rename from __tests__/actions/misc.js rename to src/actions/__tests__/misc.js index 84314f1884..b8e0e7caf5 100644 --- a/__tests__/actions/misc.js +++ b/src/actions/__tests__/misc.js @@ -2,37 +2,37 @@ import ReactNative from 'react-native'; import thunk from 'redux-thunk'; import configureStore from 'redux-mock-store'; -import { trackActionWithoutData } from '../../src/actions/analytics'; +import { trackActionWithoutData } from '../analytics'; import { openCommunicationLink, loadStepsAndJourney, navigateToStageScreen, assignContactAndPickStage, -} from '../../src/actions/misc'; +} from '../misc'; import { createContactAssignment, updatePersonAttributes, getPersonScreenRoute, -} from '../../src/actions/person'; -import { getContactSteps } from '../../src/actions/steps'; -import { reloadJourney } from '../../src/actions/journey'; -import { navigatePush, navigateReplace } from '../../src/actions/navigation'; -import { PERSON_STAGE_SCREEN } from '../../src/containers/PersonStageScreen'; -import { STAGE_SCREEN } from '../../src/containers/StageScreen'; -import { CONTACT_PERSON_SCREEN } from '../../src/containers/Groups/AssignedPersonScreen'; +} from '../person'; +import { getContactSteps } from '../steps'; +import { reloadJourney } from '../journey'; +import { navigatePush, navigateReplace } from '../navigation'; +import { PERSON_STAGE_SCREEN } from '../../containers/PersonStageScreen'; +import { STAGE_SCREEN } from '../../containers/StageScreen'; +import { CONTACT_PERSON_SCREEN } from '../../containers/Groups/AssignedPersonScreen'; import { contactAssignmentSelector, orgPermissionSelector, -} from '../../src/selectors/people'; -import { isMemberForOrg } from '../../src/utils/common'; - -jest.mock('../../src/actions/analytics'); -jest.mock('../../src/actions/steps'); -jest.mock('../../src/actions/journey'); -jest.mock('../../src/actions/navigation'); -jest.mock('../../src/actions/person'); -jest.mock('../../src/selectors/people'); -jest.mock('../../src/utils/common'); +} from '../../selectors/people'; +import { isMemberForOrg } from '../../utils/common'; + +jest.mock('../analytics'); +jest.mock('../steps'); +jest.mock('../journey'); +jest.mock('../navigation'); +jest.mock('../person'); +jest.mock('../../selectors/people'); +jest.mock('../../utils/common'); const mockStore = state => configureStore([thunk])(state); let store; diff --git a/__tests__/actions/navigation.js b/src/actions/__tests__/navigation.js similarity index 98% rename from __tests__/actions/navigation.js rename to src/actions/__tests__/navigation.js index 408375706d..4e5709fd9a 100644 --- a/__tests__/actions/navigation.js +++ b/src/actions/__tests__/navigation.js @@ -16,7 +16,7 @@ import { navigateBack, navigateReset, navigateReplace, -} from '../../src/actions/navigation'; +} from '../navigation'; const routeName = 'screenName'; const params = { prop1: 'value1' }; diff --git a/__tests__/actions/navigationInit.js b/src/actions/__tests__/navigationInit.js similarity index 93% rename from __tests__/actions/navigationInit.js rename to src/actions/__tests__/navigationInit.js index 23c0b24dad..6f8dd90374 100644 --- a/__tests__/actions/navigationInit.js +++ b/src/actions/__tests__/navigationInit.js @@ -1,8 +1,8 @@ -import { MAIN_TABS } from '../../src/constants'; -import { ADD_SOMEONE_SCREEN } from '../../src/containers/AddSomeoneScreen'; -import { GET_STARTED_SCREEN } from '../../src/containers/GetStartedScreen'; -import { initialRoute } from '../../src/actions/navigationInit'; -import { LOGIN_SCREEN } from '../../src/containers/LoginScreen'; +import { MAIN_TABS } from '../../constants'; +import { ADD_SOMEONE_SCREEN } from '../../containers/AddSomeoneScreen'; +import { GET_STARTED_SCREEN } from '../../containers/GetStartedScreen'; +import { initialRoute } from '../navigationInit'; +import { LOGIN_SCREEN } from '../../containers/LoginScreen'; const token = 'sfhaspofuasdnfpwqnfoiqwofiwqioefpqwnofuoweqfniuqweouiowqefonpqnowfpowqfneqowfenopnqwnfeo'; diff --git a/__tests__/actions/notifications.js b/src/actions/__tests__/notifications.js similarity index 96% rename from __tests__/actions/notifications.js rename to src/actions/__tests__/notifications.js index 4911de6545..2edd428096 100644 --- a/__tests__/actions/notifications.js +++ b/src/actions/__tests__/notifications.js @@ -12,7 +12,7 @@ import { configureNotificationHandler, requestNativePermissions, showReminderOnLoad, -} from '../../src/actions/notifications'; +} from '../notifications'; import { GCM_SENDER_ID, LOAD_PERSON_DETAILS, @@ -20,14 +20,14 @@ import { NAVIGATE_FORWARD, LOAD_HOME_NOTIFICATION_REMINDER, REQUEST_NOTIFICATIONS, -} from '../../src/constants'; -import * as common from '../../src/utils/common'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import { getPersonDetails, navToPersonScreen } from '../../src/actions/person'; -import { NOTIFICATION_PRIMER_SCREEN } from '../../src/containers/NotificationPrimerScreen'; - -jest.mock('../../src/actions/person'); -jest.mock('../../src/actions/api'); +} from '../../constants'; +import * as common from '../../utils/common'; +import callApi, { REQUESTS } from '../api'; +import { getPersonDetails, navToPersonScreen } from '../person'; +import { NOTIFICATION_PRIMER_SCREEN } from '../../containers/NotificationPrimerScreen'; + +jest.mock('../person'); +jest.mock('../api'); jest.mock('react-native-push-notification'); jest.mock('react-native-config', () => ({ GCM_SENDER_ID: 'Test GCM Sender ID', diff --git a/__tests__/actions/onboardingProfile.js b/src/actions/__tests__/onboardingProfile.js similarity index 94% rename from __tests__/actions/onboardingProfile.js rename to src/actions/__tests__/onboardingProfile.js index 6f0bee2791..5e5b14df83 100644 --- a/__tests__/actions/onboardingProfile.js +++ b/src/actions/__tests__/onboardingProfile.js @@ -9,7 +9,7 @@ import { createPerson, resetPerson, completeOnboarding, -} from '../../src/actions/onboardingProfile'; +} from '../onboardingProfile'; import { COMPLETE_ONBOARDING, FIRST_NAME_CHANGED, @@ -17,10 +17,10 @@ import { PERSON_FIRST_NAME_CHANGED, PERSON_LAST_NAME_CHANGED, RESET_ONBOARDING_PERSON, -} from '../../src/constants'; -import callApi, { REQUESTS } from '../../src/actions/api'; +} from '../../constants'; +import callApi, { REQUESTS } from '../api'; -jest.mock('../../src/actions/api'); +jest.mock('../api'); const dispatch = jest.fn(response => Promise.resolve(response)); diff --git a/__tests__/actions/organizations.js b/src/actions/__tests__/organizations.js similarity index 98% rename from __tests__/actions/organizations.js rename to src/actions/__tests__/organizations.js index 1ab1e8db98..dbad0375d8 100644 --- a/__tests__/actions/organizations.js +++ b/src/actions/__tests__/organizations.js @@ -8,8 +8,8 @@ import { GET_ORGANIZATION_PEOPLE, LOAD_ORGANIZATIONS, DEFAULT_PAGE_LIMIT, -} from '../../src/constants'; -import callApi, { REQUESTS } from '../../src/actions/api'; +} from '../../constants'; +import callApi, { REQUESTS } from '../api'; import { getMyOrganizations, getOrganizationsContactReports, @@ -18,10 +18,10 @@ import { getOrganizationMembersNextPage, addNewPerson, getMyCommunities, -} from '../../src/actions/organizations'; +} from '../organizations'; -jest.mock('../../src/selectors/organizations'); -jest.mock('../../src/actions/api'); +jest.mock('../../selectors/organizations'); +jest.mock('../api'); const myId = '1'; diff --git a/__tests__/actions/people.js b/src/actions/__tests__/people.js similarity index 96% rename from __tests__/actions/people.js rename to src/actions/__tests__/people.js index 09f17eb422..dfd86bd1d9 100644 --- a/__tests__/actions/people.js +++ b/src/actions/__tests__/people.js @@ -1,10 +1,10 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { searchPeople, getMyPeople } from '../../src/actions/people'; -import callApi, { REQUESTS } from '../../src/actions/api'; +import { searchPeople, getMyPeople } from '../people'; +import callApi, { REQUESTS } from '../api'; -jest.mock('../../src/actions/api'); +jest.mock('../api'); const mockStore = configureStore([thunk]); let store; diff --git a/__tests__/actions/person.js b/src/actions/__tests__/person.js similarity index 96% rename from __tests__/actions/person.js rename to src/actions/__tests__/person.js index 27339e9931..f0ffa7600f 100644 --- a/__tests__/actions/person.js +++ b/src/actions/__tests__/person.js @@ -6,7 +6,7 @@ import { LOAD_PERSON_DETAILS, DELETE_PERSON, ORG_PERMISSIONS, -} from '../../src/constants'; +} from '../../constants'; import { getMe, getPersonDetails, @@ -18,10 +18,10 @@ import { savePersonNote, getPersonNote, navToPersonScreen, -} from '../../src/actions/person'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import * as analytics from '../../src/actions/analytics'; -import { navigatePush } from '../../src/actions/navigation'; +} from '../person'; +import callApi, { REQUESTS } from '../api'; +import * as analytics from '../analytics'; +import { navigatePush } from '../navigation'; import { CONTACT_PERSON_SCREEN, IS_USER_CREATED_MEMBER_PERSON_SCREEN, @@ -30,19 +30,19 @@ import { ME_PERSONAL_PERSON_SCREEN, IS_GROUPS_ME_COMMUNITY_PERSON_SCREEN, ME_COMMUNITY_PERSON_SCREEN, -} from '../../src/containers/Groups/AssignedPersonScreen/'; -import { UNASSIGNED_PERSON_SCREEN } from '../../src/containers/Groups/UnassignedPersonScreen'; +} from '../../containers/Groups/AssignedPersonScreen'; +import { UNASSIGNED_PERSON_SCREEN } from '../../containers/Groups/UnassignedPersonScreen'; import { personSelector, orgPermissionSelector, contactAssignmentSelector, -} from '../../src/selectors/people'; -import { organizationSelector } from '../../src/selectors/organizations'; +} from '../../selectors/people'; +import { organizationSelector } from '../../selectors/organizations'; -jest.mock('../../src/actions/api'); -jest.mock('../../src/actions/navigation'); -jest.mock('../../src/selectors/people'); -jest.mock('../../src/selectors/organizations'); +jest.mock('../api'); +jest.mock('../navigation'); +jest.mock('../../selectors/people'); +jest.mock('../../selectors/organizations'); const myId = '1'; diff --git a/__tests__/actions/selectStage.js b/src/actions/__tests__/selectStage.js similarity index 84% rename from __tests__/actions/selectStage.js rename to src/actions/__tests__/selectStage.js index d15fc07fd9..c68070238e 100644 --- a/__tests__/actions/selectStage.js +++ b/src/actions/__tests__/selectStage.js @@ -1,17 +1,14 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { - updateUserStage, - selectPersonStage, -} from '../../src/actions/selectStage'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import { refreshImpact } from '../../src/actions/impact'; -import { getPersonDetails } from '../../src/actions/person'; +import { updateUserStage, selectPersonStage } from '../selectStage'; +import callApi, { REQUESTS } from '../api'; +import { refreshImpact } from '../impact'; +import { getPersonDetails } from '../person'; -jest.mock('../../src/actions/api'); -jest.mock('../../src/actions/impact'); -jest.mock('../../src/actions/person'); +jest.mock('../api'); +jest.mock('../impact'); +jest.mock('../person'); const mockStore = configureStore([thunk]); let store; diff --git a/__tests__/actions/steps.js b/src/actions/__tests__/steps.js similarity index 94% rename from __tests__/actions/steps.js rename to src/actions/__tests__/steps.js index eac1836492..80089cab6e 100644 --- a/__tests__/actions/steps.js +++ b/src/actions/__tests__/steps.js @@ -2,7 +2,7 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import i18next from 'i18next'; -import callApi, { REQUESTS } from '../../src/actions/api'; +import callApi, { REQUESTS } from '../api'; import { completeStep, getStepSuggestions, @@ -12,13 +12,13 @@ import { addSteps, completeStepReminder, deleteStepWithTracking, -} from '../../src/actions/steps'; -import { reloadGroupCelebrateFeed } from '../../src/actions/celebration'; -import { refreshImpact } from '../../src/actions/impact'; -import * as analytics from '../../src/actions/analytics'; -import { mockFnWithParams } from '../../testUtils'; -import * as common from '../../src/utils/common'; -import { buildTrackingObj } from '../../src/utils/common'; +} from '../steps'; +import { reloadGroupCelebrateFeed } from '../celebration'; +import { refreshImpact } from '../impact'; +import * as analytics from '../analytics'; +import { mockFnWithParams } from '../../../testUtils'; +import * as common from '../../utils/common'; +import { buildTrackingObj } from '../../utils/common'; import { ACTIONS, COMPLETED_STEP_COUNT, @@ -26,8 +26,8 @@ import { STEP_NOTE, TOGGLE_STEP_FOCUS, CUSTOM_STEP_TYPE, -} from '../../src/constants'; -import { ADD_STEP_SCREEN } from '../../src/containers/AddStepScreen'; +} from '../../constants'; +import { ADD_STEP_SCREEN } from '../../containers/AddStepScreen'; const mockStore = configureStore([thunk]); let store; @@ -38,9 +38,9 @@ const orgId = '123'; const mockDate = '2018-02-14 11:30:00 UTC'; common.formatApiDate = jest.fn().mockReturnValue(mockDate); -jest.mock('../../src/actions/api'); -jest.mock('../../src/actions/impact'); -jest.mock('../../src/actions/celebration'); +jest.mock('../api'); +jest.mock('../impact'); +jest.mock('../celebration'); beforeEach(() => { jest.clearAllMocks(); diff --git a/__tests__/actions/surveys.js b/src/actions/__tests__/surveys.js similarity index 91% rename from __tests__/actions/surveys.js rename to src/actions/__tests__/surveys.js index 89f1a468d3..4039d7b188 100644 --- a/__tests__/actions/surveys.js +++ b/src/actions/__tests__/surveys.js @@ -1,17 +1,13 @@ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import callApi, { REQUESTS } from '../../src/actions/api'; -import { - getMySurveys, - getOrgSurveys, - getOrgSurveysNextPage, -} from '../../src/actions/surveys'; -import { GET_ORGANIZATION_SURVEYS } from '../../src/constants'; +import callApi, { REQUESTS } from '../api'; +import { getMySurveys, getOrgSurveys, getOrgSurveysNextPage } from '../surveys'; +import { GET_ORGANIZATION_SURVEYS } from '../../constants'; const apiResponse = { type: 'successful' }; -jest.mock('../../src/actions/api'); +jest.mock('../api'); let store; diff --git a/__tests__/api/api.js b/src/api/__tests__/api.js similarity index 90% rename from __tests__/api/api.js rename to src/api/__tests__/api.js index dba46e5bf1..1f92877215 100644 --- a/__tests__/api/api.js +++ b/src/api/__tests__/api.js @@ -1,6 +1,7 @@ -import API_CALLS from '../../src/api/index'; -import * as utils from '../../src/api/utils'; -import { REQUESTS } from '../../src/actions/api'; +import API_CALLS from '..'; + +import * as utils from '../utils'; +import { REQUESTS } from '../../actions/api'; beforeEach(() => { global.APILOG = jest.fn(); diff --git a/__tests__/api/utils.js b/src/api/__tests__/utils.js similarity index 99% rename from __tests__/api/utils.js rename to src/api/__tests__/utils.js index 7b2e3c91a3..d1e72717cb 100644 --- a/__tests__/api/utils.js +++ b/src/api/__tests__/utils.js @@ -1,4 +1,4 @@ -import request from '../../src/api/utils'; +import request from '../utils'; const sessionKey = 'X-MH-Session'; diff --git a/__tests__/components/AssignToMeButton.js b/src/components/AssignToMeButton/__tests__/AssignToMeButton.js similarity index 80% rename from __tests__/components/AssignToMeButton.js rename to src/components/AssignToMeButton/__tests__/AssignToMeButton.js index 797ae5f372..db0423d067 100644 --- a/__tests__/components/AssignToMeButton.js +++ b/src/components/AssignToMeButton/__tests__/AssignToMeButton.js @@ -2,14 +2,16 @@ import React from 'react'; import thunk from 'redux-thunk'; import configureStore from 'redux-mock-store'; -import { testSnapshotShallow, renderShallow } from '../../testUtils'; -import AssignToMeButton from '../../src/components/AssignToMeButton'; -import { assignContactAndPickStage } from '../../src/actions/misc'; - -jest.mock('../../src/actions/misc'); -jest.mock('../../src/actions/person'); -jest.mock('../../src/selectors/people'); -jest.mock('../../src/actions/navigation'); +import { testSnapshotShallow, renderShallow } from '../../../../testUtils'; + +import AssignToMeButton from '..'; + +import { assignContactAndPickStage } from '../../../actions/misc'; + +jest.mock('../../../actions/misc'); +jest.mock('../../../actions/person'); +jest.mock('../../../selectors/people'); +jest.mock('../../../actions/navigation'); const myId = '25'; const state = { auth: { person: { id: myId } } }; diff --git a/__tests__/components/__snapshots__/AssignToMeButton.js.snap b/src/components/AssignToMeButton/__tests__/__snapshots__/AssignToMeButton.js.snap similarity index 100% rename from __tests__/components/__snapshots__/AssignToMeButton.js.snap rename to src/components/AssignToMeButton/__tests__/__snapshots__/AssignToMeButton.js.snap diff --git a/__tests__/Button.js b/src/components/Button/__tests__/Button.js similarity index 88% rename from __tests__/Button.js rename to src/components/Button/__tests__/Button.js index e19fb529a5..c933e27ae0 100644 --- a/__tests__/Button.js +++ b/src/components/Button/__tests__/Button.js @@ -2,9 +2,9 @@ import 'react-native'; import React from 'react'; import { shallow } from 'enzyme'; -// Note: test renderer must be required after react-native. -import { Button } from '../src/components/common'; -import { testSnapshot } from '../testUtils'; +import Button from '..'; + +import { testSnapshot } from '../../../../testUtils'; it('renders correctly', () => { testSnapshot(