diff --git a/recipients_app/CONTRIBUTING.md b/recipients_app/CONTRIBUTING.md index 7392cc118..707ad69c6 100644 --- a/recipients_app/CONTRIBUTING.md +++ b/recipients_app/CONTRIBUTING.md @@ -7,7 +7,7 @@ goals. It lets recipients; 2. confirm monthly payments 3. fill out surveys for the impact measurement -The apps are build with Flutter and run on Android and iPhones. +The apps are build with Flutter and run on Android and iOS. ## Basic Setup @@ -22,6 +22,8 @@ Code with predefined build configs. We have two build flavors: - `dev` -> Connecting with Firebase Emulators (Firestore and Auth) +- `stage` -> Connecting with staging online firebase project and need + real Firebase configuration json / plist file - `prod` -> Connecting with production online firebase project and need real Firebase configuration json / plist file diff --git a/recipients_app/README.md b/recipients_app/README.md index 8f1483d8e..bf0673022 100644 --- a/recipients_app/README.md +++ b/recipients_app/README.md @@ -42,17 +42,29 @@ or dart run build_runner build --delete-conflicting-outputs ``` -# Testing - -## Run golden tests - -Run `flutter test --update-golden` to update golden files. - ## Rebuilding Translations Translations are stored in lib/l10n/app_en.arb. To rebuild the -translations after you changed something run: `flutter gen-l10n` +translations after you changed something run: + +``` +flutter gen-l10n +``` To use a translated string in the code use: `AppLocalizations.of(context).helloWorld` and import: `import 'package:flutter_gen/gen_l10n/app_localizations.dart';` + +## Testing + +### Manually + +See [How to test](./docu/app_testing_guides/how_to_test.md) + +### Run golden tests + +Run `flutter test --update-golden` to update golden files. + +## Releasing + +See [How to release the app](./docu/app_release_guides/releasing.md) diff --git a/recipients_app/docu/app_release_guides/releasing.md b/recipients_app/docu/app_release_guides/releasing.md new file mode 100644 index 000000000..b1d9ee46a --- /dev/null +++ b/recipients_app/docu/app_release_guides/releasing.md @@ -0,0 +1,37 @@ +# How to release the apps + +1. Increment app version and build number in pubspec.yaml +1. Run CodeMagic Build "iOS Staging (Firebase App Distribution)" +1. Run CodeMagic Build "Android Staging (Firebase App Distribution)" +1. Test the app on the Staging environment. See + [manual test plans](../app_testing_guides/manual_test_plans.md). +1. If tests were ok, proceed with next step. Otherwise fix the bugs and + start again at first step +1. Build the app for production: + 1. Run CodeMagic Build "iOS Production" + 1. Run CodeMagic Build "Android Production" +1. Add git tags with current app version and code + - like "app-release-ios-1.1.13(30)" and + "app-release-android-1.1.13(30)" +1. Create a new Apple App Store app version entry: + - Login to [Appstore Connect](https://appstoreconnect.apple.com/apps) + - Select app "Social Income" + - Add new iOS app version + - Check if we have to update some store data + - Add "What's New in This Version?" text for all supported languages + - Add the correct Build + - Add the app version for Review +1. Create a new release on the "internal testing" track in the Google + Play Console: + - Login to [Google Play Console](https://play.google.com/console) + - Select the production app + - Go to "Release"->"Testing"->"Internal testing" + - Click on the button "Create new release" + - Upload the aab file from the CodeMagic Build "Android Production" + - Add release notes for all supported languages + - Save and publish the release in the Internal Testing track + - Do a quick smoke test of this app release + - Promote the release to Production + - Send the release to Production App Review +1. When both app reviews are approved by Apple and Google, release them + into the stores diff --git a/recipients_app/docu/app_testing_guides/how_to_test.md b/recipients_app/docu/app_testing_guides/how_to_test.md new file mode 100644 index 000000000..8697efa4b --- /dev/null +++ b/recipients_app/docu/app_testing_guides/how_to_test.md @@ -0,0 +1,20 @@ +# How to test the app for the release? + +Usually for a upcoming release we test the app manually to ensure that +the core functionality is still working. + +For that we use usually the environment STAGING. + +- Here you find a description of the available + [test environments](./test_environments.md), its usage and how to + access them. + +- Here you find the prepared + [test accounts](https://docs.google.com/document/d/1-y__kbnLX3KCHp2pdXhzq58rbMmnXwUI-Cirihy224o/edit?pli=1#heading=h.4a9qjbxltxku) + to use for tesing the app. **These test accounts are only accessable + for core developers**. Please try to leave these accounts in the + described account state after your tests. This makes testing for all + of us easier :). + +- Here you find the + [manual test plans](../app_testing_guides/manual_test_plans.md). diff --git a/recipients_app/docu/app_testing_guides/manual_test_plans.md b/recipients_app/docu/app_testing_guides/manual_test_plans.md new file mode 100644 index 000000000..9b83471ef --- /dev/null +++ b/recipients_app/docu/app_testing_guides/manual_test_plans.md @@ -0,0 +1,99 @@ +# Manual test plans + +Usually these tests are done on the environment STAGING with the +corresponding +[test accounts](https://docs.google.com/document/d/1-y__kbnLX3KCHp2pdXhzq58rbMmnXwUI-Cirihy224o/edit?pli=1#heading=h.4a9qjbxltxku). + +## Registration + +- On the Account creation page, by clicking the text link “Privacy + Policy” a webview with the privacy policy is opened. +- TODO: Click on the button “Create Account” then … + +## Login + +- Switch off the internet and try to login. => An error message occurs +- Can I login with a valid account? => Enter registered phone number, + enter verification code, You are logged in. + +## Logout + +- Logout of the app: Go to “Edit”, scroll down and “Sign Out” => The + user is signed out and back on the Login page. This also works if + there is no internet. + +## Profile + +- Tap on “Edit” and change personal data. => There should be a message + “Profile updated successfully” after the change +- Switch off the internet and tap on “Edit” and change personal data. => + There is no message. Data is saved locally and will be synced once the + internet is back again. This is also the case if you leave the Profile + page. + +## Payments + +- Can you pull to refresh to see a newly added payment in the Admin + Staging Tool +- Can you confirm if a payment has been made and if the change has been + stored in Firebase? + - Offline feature: Additionally, if you confirm while in flight mode + and then reconnect to the internet, is it also stored in Firebase? +- Can you deny a payment? +- Can you resolve the issue from the mobile phone? + +## Surveys + +- Do you see the card “My surveys” +- If you tap the button “Overview”, then a new page with a list of all + surveys is shown. + - If there is a due survey, then the list entry of this survey has a + “Start Survey” button +- Can you pull to refresh to see a changed survey status in the Admin + Staging Tool +- Is a survey that is due shown as a separate card on the main screen? + - A card for a survey should show if + - Survey’s due date is in 10 days or less + - Survey’s due date was less than 20 days ago + - The card says “Missed Survey” if + - Survey’s due date was less than 15 days ago +- If two surveys are due, then two cards are shown +- Does the survey open on a new page when you tap “Start Survey”? +- Can you fill out the survey? +- If you filled out a survey, then the survey is shown as “Completed”. + +## OS Permission stuff + +### Android 13 and higher + +On first startup the app asks for permission to send notifications. This +happens when the login page is shown. + +### Android 12 and lower + +There is no permission dialog on app start up. Permissions for +notifications are set automatically to “allowed”. You can check this in +the app info for the app in the Android settings app: +Settings->Apps->Social Income-> Notifications are allowed. + +## Account deletion + +Not yet added as feature + +# Video manuals for Admin Staging Tool + +#### How do you add a new payment in the Admin Staging Tool? + +→ +[Add payment.mov](https://drive.google.com/file/d/1I6PFLXp3BpN1v3X1mPL4wofL5SEG2rTy/view?usp=drive_link) + +#### How do you change a survey status in the Admin Staging Tool? + +→ +[Change survey status.mov](https://drive.google.com/file/d/1I3SELIPc0ReLpIGc_Q0lY291GWUjFrgU/view?usp=sharing) + +# Things to know about the app or Sierra Leone + +- The leone is the currency of Sierra Leone. It is subdivided into 100 + cents. As of 1 July 2022, the ISO 4217 code is SLE due to a + redenomination of the old leone (SLL) at a rate of SLL 1000 to SLE 1. diff --git a/recipients_app/docu/app_testing_guides/test_environments.md b/recipients_app/docu/app_testing_guides/test_environments.md new file mode 100644 index 000000000..38702f49d --- /dev/null +++ b/recipients_app/docu/app_testing_guides/test_environments.md @@ -0,0 +1,88 @@ +# Test environments + +## Available testing stages + +We have three testing stages: + +- DEV +- STAGING +- PROD + +## Test in Stage “DEV” + +The stage DEV is for feature development and bug fixing on the local +development machine. + +### App Name is: Dev Social Income + +### Available Backends: + +There is no Firebase Project for this stage. To test the app while +developing, we use the Firebase emulator. The emulator works on your +local host machine; the easiest way to run the app is on the Android +emulator. Real devices need some additional setup. + +But you can also use the Firebase Staging Backend to test your local +stuff. See Firebase Staging Project and Admin Staging Tool + +## Test in Stage “STAGING” + +### App Name is: Stage Social Income + +Login Credentials: Either use these +[test accounts](https://docs.google.com/document/d/1-y__kbnLX3KCHp2pdXhzq58rbMmnXwUI-Cirihy224o/edit?pli=1#heading=h.4a9qjbxltxku) +or your mobile number on file in the recipients list in the +[Admin Staging Tool](https://console.firebase.google.com/u/1/project/social-income-staging/overview) + +### iOS Platform + +Install the app either from Firebase App Distribution (Invitation +needed) or TestFlight (Invitation needed on App Store Connect). + +App Distribution Installation instructions: Open email from Firebase App +Distribution, accept invitation with Google account, enable installation +of profile, use Firebase App Distribution to download latest Stage +Social Income. Troubleshoot: Tester Instruction by Firebase App +Distribution + +### Android Platform + +Install the app either from Firebase App Distribution (Invitation link +click here) or from Google Play Store Console. For this you have to be +added as a tester (request access). + +App Distribution Installation instructions: Open email from Firebase App +Distribution, accept invitation with Google account, enable installation +from unknown sources, use Firebase App Distribution to download latest +Stage Social Income. Troubleshoot: Tester Instruction by Firebase App +Distribution + +### Backend for Stage STAGING + +The Staging App uses the Firebase Staging Backend. See Firebase Staging +Project (only for admins) and Admin Staging Tool (request access). + +## Test in Stage “PROD” + +### App Name is: Social Income + +### Requirements: + +Login Credentials: You need to have your phone number added in the +recipients list (with the flag test) on Admin Prod Tool (only for core +developers) + +### iOS Platform + +Install the app via Testflight: You need to be authorized on TestFlight +(ask core developers to be added) + +### Android Platform + +Install Android: You need to be a tester on the internal track on Google +Play Console (ask core developers to be added) + +### Backend for Stage PROD + +The Prod App uses the Firebase Prod Backend. See Firebase Prod Project +and Admin Prod Tool (request access).