Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into issue/891/location-service-android-1
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmurtry committed Aug 14, 2020
2 parents ece6ed8 + 65b6732 commit da948f6
Show file tree
Hide file tree
Showing 109 changed files with 3,223 additions and 1,038 deletions.
22 changes: 22 additions & 0 deletions .detoxrc.json
@@ -0,0 +1,22 @@
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"configurations": {
"ios": {
"type": "ios.simulator",
"binaryPath": "./ios/build/Build/Products/Debug-iphonesimulator/CovidShield.app",
"build": "xcodebuild -workspace ios/CovidShield.xcworkspace -scheme CovidShield -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"device": {
"type": "iPhone 8"
}
},
"android": {
"type": "android.emulator",
"binaryPath": "./android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"device": {
"avdName": "Pixel_3_API_29"
}
}
}
}
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -19,7 +19,7 @@ module.exports = {
'import/no-named-as-default': 'off',
'@shopify/images-no-direct-imports': 'off',
'@shopify/jest/no-snapshots': 'off',
'no-console': 'off',
'no-console': 'error',
camelcase: 'off',
'no-extend-native': 'off',
'max-params': 'off',
Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
@@ -0,0 +1,23 @@
---
name: Bug
about: Problems or flaws experienced in the app. Includes accessibility issues.
title: Bug
labels: bug, inbox
assignees: ""
---

# Summary

> One paragraph explanation of the bug, including why it is a problem (i.e. what does it prevent a user from doing or accomplishing). Screenshots are greatly helpful here too.
# Steps to reproduce

> Sequential steps (1., 2., 3., ...) that describe how to reproduce the bug. This will help a developer experience what the user experienced so that they can debug it.
# Environment

> What kind of device was the bug experienced with. This would include device, version of the operating system (i.e. iOS or Android), and any other environmental details that might be relevant.
# Unresolved questions / Out of scope

> Are there any related issues you consider out of scope for this issue that could be addressed in the future?
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,23 @@
---
name: Feature request
about: Request a new feature, propose changes to an existing feature, or make a suggestion.
title: Request new feature
labels: enhancement, inbox
assignees: ""
---

# Summary

> One paragraph explanation of the change. Ideally, this includes a statement in the following format: "As a (kind of user or stakeholder), I want (what feature) because (it does helps the user achieve or do what)."
> An example for having a dark mode might look like: "As a user, I want a dark mode so that the app doesn't hurt my eyes."
# Design detail

> Explain the design in enough detail for somebody familiar with the application to understand. This should get into specifics and corner-cases, and include examples of how the service is used. Any new terminology should be defined here. It is greatly appreciated if you have any design images or mockups that would be help clarify your idea.
> Following the example of a dark mode feature request, you might describe that text is light, backgrounds are dark, and images have sufficient contrast with the dark backgrounds.
# Unresolved questions / Out of scope

> Are there any related issues or tangent features you consider out of scope for this issue that could be addressed in the future?
34 changes: 34 additions & 0 deletions .github/pull_request_template.md
@@ -0,0 +1,34 @@
# Summary

> 1-3 sentence description of the changed you're proposing, including a link to a GitHub Issue # or Trello card if applicable.
# Test instructions

> Sequential steps (1., 2., 3., ...) that describe how to test this change. This will help a developer test things out without too much detective work. Also, include any environmental setup steps that aren't in the normal README steps and/or any time-based elements that this requires.
# Help requested

> Things that you (the submitter) want reviewers to pay very close attention to when they review this.
# Unresolved questions / Out of scope

> Are there any related issues or tangent features you consider out of scope for this issue that could be addressed in the future?
# Reviewer checklist

This is a suggested checklist of questions reviewers might ask during their review:

- [ ] Does this meet a user need?
- [ ] Is it accessible?
- [ ] Is it translated between both offical languages?
- [ ] Is the code maintainable?
- [ ] Have you tested it?
- [ ] Are there automated tests?
- [ ] Does this cause automated test coverage to drop?
- [ ] Does this break existing functionality?
- [ ] Should this be split into smaller PRs to decrease change risk?
- [ ] Does this change the privacy policy?
- [ ] Does this introduce any security concerns?
- [ ] Does this significantly alter performance?
- [ ] What is the risk level of using added dependencies?
- [ ] Should any documentation be updated as a result of this? (i.e. README setup, etc.)
7 changes: 4 additions & 3 deletions .gitignore
Expand Up @@ -91,12 +91,13 @@ fastlane/certs/*
ios/GoogleService-Info.plist
ios/Generated.xcconfig
android/app/google-services.json
.env.local
.env.secrets
.env.release
!.env.example
.env.*
.env

# generated files
ios/assets

.env.release

artifacts/*
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -3,3 +3,6 @@ source 'https://rubygems.org'
gem 'cocoapods', '1.7.5'
gem 'cocoapods-check'
gem 'fastlane'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
40 changes: 21 additions & 19 deletions Gemfile.lock
Expand Up @@ -11,17 +11,17 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.341.0)
aws-sdk-core (3.103.0)
aws-partitions (1.350.0)
aws-sdk-core (3.104.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.36.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.74.0)
aws-sdk-core (~> 3, >= 3.102.1)
aws-sdk-s3 (1.75.0)
aws-sdk-core (~> 3, >= 3.104.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
Expand Down Expand Up @@ -74,19 +74,19 @@ GEM
rake (~> 13.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
dotenv (2.7.6)
emoji_regex (3.0.0)
escape (0.0.4)
excon (0.75.0)
excon (0.76.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.1.7)
fastlane (2.151.2)
fastimage (2.2.0)
fastlane (2.154.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
Expand All @@ -97,9 +97,9 @@ GEM
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (>= 0.17, < 2.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (>= 0.13.1, < 2.0)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.37.0, < 0.39.0)
Expand All @@ -122,6 +122,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-yarn (1.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand All @@ -136,17 +137,17 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.2)
google-cloud-env (1.3.3)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.26.2)
google-cloud-storage (1.27.0)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.0)
googleauth (0.13.1)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -167,13 +168,13 @@ GEM
mini_mime (1.0.2)
minitest (5.14.1)
molinillo (0.6.6)
multi_json (1.14.1)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.0)
netrc (0.11.0)
os (1.1.0)
os (1.1.1)
plist (3.5.0)
public_suffix (4.0.5)
rake (13.0.1)
Expand All @@ -200,7 +201,7 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.7.1)
tty-screen (0.8.0)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tzinfo (1.2.7)
Expand All @@ -211,12 +212,12 @@ GEM
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.17.0)
xcodeproj (1.17.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
Expand All @@ -229,6 +230,7 @@ DEPENDENCIES
cocoapods (= 1.7.5)
cocoapods-check
fastlane
fastlane-plugin-yarn

BUNDLED WITH
2.1.4
24 changes: 18 additions & 6 deletions README.md
Expand Up @@ -4,6 +4,16 @@

![Lint + Typscript](https://github.com/cds-snc/covid-alert-app/workflows/CI/badge.svg)

*Available for iOS and Android:*

<a href="https://apps.apple.com/ca/app/id1520284227"><img src="https://www.canada.ca/content/dam/phac-aspc/images/services/diseases-maladies/coronavirus-disease-covid-19/covid-alert/app-store-eng.png" alt="Download on the App Store"></a>
<a href="https://play.google.com/store/apps/details?id=ca.gc.hcsc.canada.stopcovid"><img src="https://www.canada.ca/content/dam/phac-aspc/images/services/diseases-maladies/coronavirus-disease-covid-19/covid-alert/google-play-eng.png" alt="Get it on Google Play"></a>

*Pour iOS et Android:*

<a href="https://apps.apple.com/ca/app/id1520284227?l=fr"><img src="https://www.canada.ca/content/dam/phac-aspc/images/services/diseases-maladies/coronavirus-disease-covid-19/covid-alert/app-store-fra.png" alt="Télécharger dans l'App Store"></a>
<a href="https://play.google.com/store/apps/details?id=ca.gc.hcsc.canada.stopcovid&hl=fr"><img src="https://www.canada.ca/content/dam/phac-aspc/images/services/diseases-maladies/coronavirus-disease-covid-19/covid-alert/google-play-fra.png" alt="Disponible sur Google Play"></a>

Adapted from <https://github.com/CovidShield/mobile> ([upstream](https://github.com/cds-snc/covid-alert-app/blob/master/FORK.md))

This repository implements a React Native _client application_ for Apple/Google's [Exposure
Expand Down Expand Up @@ -93,7 +103,7 @@ You can also build the app with native development tool:

### Development mode

When the app is running development mode, you can tap on the COVID Alert logo at the top of the app to open the Test menu. This menu enables you to:
When the app is running in development mode, you can tap on the COVID Alert logo at the top of the app to open the Test menu. This menu enables you to:

- Put the app into test mode to bypass the Exposure Notification API check
- Change the system status
Expand All @@ -106,6 +116,7 @@ Note that: Test menu is enabled if the environment config file (`.env*`) has `TE
#### iOS Local Development

If you would like to:

- connect to a COVID Alert Diagnosis Server instance with an IP address or the server does not support HTTPS, or
- have the app run in the simulator and get automatic React-Native code updates via the Metro server;

Expand Down Expand Up @@ -144,9 +155,10 @@ yarn generate-translations
5. Add the new option in [src/screens/language/Language.tsx](./src/screens/language/Language.tsx).
6. Add the new option in Xcode `Localizations` settings (Project -> CovidShield -> Info tab -> Localizations) and make sure `Launch Screen.storyboard` is checked.

## Test plan
## Testing

See [Test Plan](./TEST_PLAN.md)
- [Manual Testing Plan](./TEST_PLAN.md)
- [End to end testing with Detox](./e2e/DETOX_DOC.md)

## Who built COVID Alert?

Expand Down Expand Up @@ -187,7 +199,7 @@ Now you can run `yarn run-android` in your root folder.
### [MacOS] Problem installing Cocoapods
When following step _2.1.1 Install Cocoapods_ if you recieve an error that looks like the following (_Please Note:_ Error message will not be identical but simliar):
When following step _2.1.1 Install Cocoapods_ if you receive an error that looks like the following (_Please Note:_ Error message will not be identical but simliar):
```bash
ERROR: Loading command: install (LoadError)
Expand All @@ -198,7 +210,7 @@ ERROR: While executing gem ... (NoMethodError)
This is because the version of Ruby you have installed does not have OpenSSL included.
You can fix this error by installing Ruby Version Manager (if you do not already have it), and reinstalling the version of ruby required with OpenSSL using the following steps:
You can fix this error by installing Ruby Version Manager (if you do not already have it), and reinstalling the version of Ruby required with OpenSSL using the following steps:
1. Install RVM following the instructions here: https://rvm.io/
1. Run the following command to install the version of Ruby needed with OpenSSL included, this will take a few minutes so be patient.
Expand All @@ -209,7 +221,7 @@ rvm reinstall 2.6.5 --with-openssl-dir=/usr/local/opt/openssl
You should now be able to install cocoapods and gem commands should now work.
____
---
# Application mobile Alerte COVID
Expand Down
4 changes: 4 additions & 0 deletions SECURITY.md
Expand Up @@ -2,8 +2,12 @@

**Do not post security issues to our public repositories.** Security issues must be reported by email to <security@cds-snc.ca>.

Please see the [Vulnerability Disclosure Policy for COVID Alert](https://github.com/cds-snc/covid-alert-documentation/blob/main/VulnerabilityDisclosurePolicy.md) for further guidance.

______________________

# Sécurité

**Ne publiez pas de problèmes de sécurité dans nos dépôts publics.** Les problèmes de sécurité doivent être signalés par courriel à <securite@cds-snc.ca>.

Veuillez consulter la [Politique de divulgation des vulnérabilités pour Alerte COVID](https://github.com/cds-snc/covid-alert-documentation/blob/main/PolitiqueDivulgationVulnerabilites.md) pour de plus amples détails.
1 change: 1 addition & 0 deletions __mocks__/@react-native-community/async-storage.ts
@@ -0,0 +1 @@
export {default} from '@react-native-community/async-storage/jest/async-storage-mock';
7 changes: 7 additions & 0 deletions android/app/build.gradle
Expand Up @@ -144,6 +144,8 @@ android {
versionCode project.env.get("APP_VERSION_CODE") as Integer
versionName project.env.get("APP_VERSION_NAME")
resValue "string", "build_config_package", "app.covidshield"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
splits {
abi {
Expand Down Expand Up @@ -179,6 +181,7 @@ android {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
}
}

Expand Down Expand Up @@ -243,6 +246,10 @@ dependencies {
} else {
implementation jscFlavor
}

androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.12'
implementation "androidx.annotation:annotation:1.1.0"
}

// Run this once to be able to run the application with BUCK
Expand Down

0 comments on commit da948f6

Please sign in to comment.