-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/improved location tracking and time intersection algorithms (#…
…195) - move localization to server based data (fallback to local data). - missing some typing fixes. - moved also notifications and external links to texts. - algorithm done. - moved logic to service. - moved params to config. - initiate config in background services. - fixed change language title issue. - added scroll to change language. - fixed missing short language text for added language. - fixed google-services mismatch. - removed unnecessary code. - fixed failed tests. - fixed eslint configuration. - added close option for 'not forced' version update. - replaced to animated hamagen logo in main screen. - fixed 'no data' screen not showing although GPS is off. - fixed logout from google if getting timeline data fails. - added auto retry to avoid failed timeline fetch on first try in iOS. - fix force update to not show if app version > server version. - add scheme to run ios script. - mock native modules - removed firebase analytics. - fixed exposure to show the latest between sick startTime and user startTime. - exposures flow screen UI refactor. - fixed foreground timer interval. - add WifiMacAddressDatabase, UserLocationsDatabase, IntersectionSickDatabase mockImplementation to setup file - tracker test pass again - fix for HV points overriding the last point in DB. - fix for unignored sample locations. - move firebase mock from setup to __mocks__ - fixed transistor SDK ignore params. - fixed wrong velocity calculations. - MC-95. - MC-94. - MC-7. - MC-33. - MC-36. - MC-93. - updateDBAccordingToSampleVelocity UT - extened Database mock - add check for onError functon to not call - accessibility fixes. - fixed #159. - fixed #155. - fixed #177. - fixed #150, #160. - updated texts file. - check with v2 force updates params from server. - crash fix. - disabled hermes. - added headless task to background geolocation. - move error check to afterAll function and add with multiple points from db test - Add test to SampleService (#186) - add scheme to run ios script - mock native modules - linting, removing unnecessary code. - move redux-mock-store to dev dependencies - fixed google timeline logout. - clear cookies after flow completed (whatever the result is). - add locale action test - fix for failed tests. - fix for BG geolocation headless callback. - improved BG geolocation config. - bumped versions. - another fix to BG geolocation config. - add axios simple mock - updated texts. - add axios mock - ignore locations with timestamp earlier then the last location saved. - add moment mock - add LocationHistoryService test start - insertToSampleDB tests - add sha256 mock - change store dispatch to return value only in tracker test - LocationHistoryService test and new mocks - fix updateDBAccordingToSampleVelocity failing tests - updated config. Co-authored-by: YossiGreen <> Co-authored-by: Sagiv Stekolshik <[email protected]> Co-authored-by: sagivStekolshik <[email protected]> Co-authored-by: SagivOnoApps <[email protected]>
- Loading branch information
1 parent
b72fbcc
commit 09293b8
Showing
82 changed files
with
2,445 additions
and
1,147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// import mockAxios from 'jest-mock-axios'; | ||
const axios = { | ||
get: jest.fn(), | ||
post: jest.fn() | ||
} | ||
|
||
axios.mockClear = function() { | ||
for(const key in axios) { | ||
axios[key]?.mockClear?.() | ||
} | ||
} | ||
export default axios; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const encode = jest.fn() | ||
|
||
const geohash = { | ||
encode | ||
} | ||
|
||
export default geohash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const subtract = jest.fn() | ||
export const date = jest.fn() | ||
export const month = jest.fn() | ||
export const year = jest.fn() | ||
export const valueOf = jest.fn() | ||
|
||
const moment = jest.fn().mockImplementation(() => ({ | ||
subtract, | ||
date, | ||
month, | ||
year, | ||
valueOf, | ||
})) | ||
|
||
moment.mockClear = function(){ | ||
for(const element in moment){ | ||
moment[element]?.mockClear?.() | ||
} | ||
} | ||
|
||
export default moment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const onLocation = jest.fn().mockImplementation(() => ({})); | ||
|
||
const ready = jest.fn().mockImplementation(() => { | ||
return jest.fn().mockResolvedValue(true); | ||
}); | ||
|
||
export default { | ||
onLocation, | ||
ready | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
export const logEvent = jest.fn(); | ||
|
||
const firebase = { | ||
messaging: jest.fn(() => { | ||
return { | ||
hasPermission: jest.fn(() => Promise.resolve(true)), | ||
subscribeToTopic: jest.fn(), | ||
unsubscribeFromTopic: jest.fn(), | ||
requestPermission: jest.fn(() => Promise.resolve(true)), | ||
getToken: jest.fn(() => Promise.resolve('myMockToken')) | ||
}; | ||
}), | ||
notifications: jest.fn(() => { | ||
return { | ||
onNotification: jest.fn(), | ||
onNotificationDisplayed: jest.fn() | ||
}; | ||
}) | ||
}; | ||
|
||
firebase.notifications.Android = { | ||
Channel: jest.fn(() => ({ | ||
setDescription: jest.fn(), | ||
setSound: jest.fn(), | ||
enableVibration: jest.fn(), | ||
setVibrationPattern: jest.fn() | ||
})), | ||
Importance: { | ||
Max: {} | ||
} | ||
}; | ||
|
||
|
||
export default firebase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Permission } from 'react-native-permissions'; | ||
|
||
export const PERMISSIONS = { | ||
IOS: { | ||
LOCATION_ALWAYS: 'LOCATION_ALWAYS' | ||
} | ||
}; | ||
|
||
export const RESULTS = { | ||
GRANTED: 'GRANTED' | ||
}; | ||
|
||
// mock out any functions you want in this style... | ||
export const check = async (permission: Permission) => { | ||
return jest.fn().mockResolvedValue(true); | ||
}; | ||
|
||
export const request = async (permission: Permission) => { | ||
return jest.fn().mockResolvedValue(true); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const echoTest = jest.fn().mockResolvedValue() | ||
const openDatabase = jest.fn() | ||
|
||
const sqlite = { | ||
enablePromise: jest.fn(), | ||
echoTest, | ||
openDatabase | ||
} | ||
|
||
export default sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.