Skip to content

Commit

Permalink
Merge remote-tracking branch 'official/develop' into self-assessment
Browse files Browse the repository at this point in the history
* official/develop:
  Fix EULA modal close icon color (Path-Check#792)
  feat(i18n) Language updates, May 10 (Path-Check#790)
  feat(GPS) Store Location Data in an encrypted Realm DB (Path-Check#788)
  Enable location status checks in testing build (Path-Check#787)
  fix(Onboarding) Fix EULA links to open in device browser (Path-Check#783)
  chore(Build) Fix debug build error with apache commons-io lib (Path-Check#775, SAF-210)
  chore(Testing) snapshot tests for LocationTracking,  main/* (Path-Check#785)
  Only render mayo clinic link when language is english (Path-Check#782)
  fix(UX) Fix pulse alignment on Android devices with “notch” (Path-Check#771)
  fix(Location) Improve location "tracking" status checks (Path-Check#749)
  Fix text crop in About screen (Path-Check#774)
  [iOS] add missing languages (Path-Check#773)
  • Loading branch information
Adam Putinski committed May 11, 2020
2 parents df3224d + 77c19b7 commit bf9be91
Show file tree
Hide file tree
Showing 84 changed files with 4,840 additions and 543 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
# flags must begin with flag_ and are case sensitive

flag_google_import=true
flag_self_assessment=false
flag_self_assessment=false
flag_better_location_status_checks=true
1 change: 1 addition & 0 deletions .env.beta
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
#
# ENVFILE=.env.beta ./gradlew assembleRelease

flag_better_location_status_checks=true
# flag_google_import=true
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ jobs:
# the node_modules caches will conflict
needs: unit-test
timeout-minutes: 15
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app
steps:
- uses: actions/checkout@master

- name: Set XCode Version
run: sudo xcode-select -s /Applications/Xcode_11.app

- name: Cache node_modules/
uses: actions/cache@v1
id: cache
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ app/locales/*_old.json

# CocoaPods
/ios/Pods/
yarn.lock
.vscode/launch.json
ios/Podfile.lock

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Safe Paths is a ‘privacy-first’ app that allows you to log your GPS trails o

The location log generated by Safe Paths cannot be accessed from outside the user’s device. However, the user can import and export their location information and use it in other projects and applications.

Safe Paths logs your device’s location once every five minutes and stores 28 days of data in under 100KB of space.
Safe Paths logs your device’s location once every five minutes and stores 14 days of data.

### Private Kit WhitePaper

Expand Down
1 change: 1 addition & 0 deletions __mocks__/@react-native-community/async-storage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default from '@react-native-community/async-storage/jest/async-storage-mock';
7 changes: 5 additions & 2 deletions __tests__/App.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
*/

import 'react-native';
import 'isomorphic-fetch';

import { render } from '@testing-library/react-native';
import React from 'react';

import App from '../App';
import {render} from '@testing-library/react-native';

jest.mock('../app/Entry', () => 'Entry');

it('renders correctly', () => {
const {asJSON} = render(<App />);
const { asJSON } = render(<App />);

expect(asJSON()).toMatchSnapshot();
});
17 changes: 12 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
apply plugin: "com.android.application"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'

project.ext.envConfigFiles = [
debug: ".env",
Expand Down Expand Up @@ -208,6 +212,8 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.annotation:annotation:1.1.0"
implementation project(':@mauron85_react-native-background-geolocation-common')
implementation 'com.bottlerocketstudios:vault:1.4.2'

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/"
Expand All @@ -216,16 +222,14 @@ dependencies {
} else {
implementation jscFlavor
}
androidTestImplementation('com.wix:detox:+') // detox: e2e testing
androidTestImplementation('com.wix:detox:+') // detox: e2e testing
implementation "androidx.core:core-ktx:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

allprojects {
repositories {
configurations.all {
// Fixes dependency conflict between react-native-local-assets and
// @mauron85/react-native-background-geolocation
exclude group: "commons-io", module: "commons-io"

// To fix the app start crash error
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
Expand All @@ -252,3 +256,6 @@ task copyDownloadableDepsToLibs(type: Copy) {
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.pathcheck.covidsafepaths.storage

import org.junit.Assert.*
import org.junit.Test

class LocationTest {

@Test
fun northAndSouthPolesNotNearby() {
assertFalse(Location.areLocationsNearby(90.0, 0.0, -90.0, 0.0))
}

@Test
fun newYorkAndSydneyNotNearby() {
assertFalse(Location.areLocationsNearby(40.7128, -74.006, -33.8688, 151.2093))
}

@Test
fun spotsInKansasCityAreNearby() {
assertTrue(Location.areLocationsNearby(39.09772, -94.582959, 39.097769, -94.582937))
}
}
Loading

0 comments on commit bf9be91

Please sign in to comment.