Skip to content

Commit

Permalink
Merge pull request #1 from Expensify/master
Browse files Browse the repository at this point in the history
E2E Fix
  • Loading branch information
dsmith111 authored Dec 23, 2020
2 parents c499a8d + dddfaa0 commit 6641dc9
Show file tree
Hide file tree
Showing 55 changed files with 1,317 additions and 272 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Welcome! Thanks for checking out Expensify.cash and for taking the time to contribute!

## Getting Started
This guide is specifically for external contributors. For a general overview of the repo, check out our README located [here](https://github.com/Expensify/Expensify.cash/blob/master/README.md). The parts of the README to pay particular attention to are how to [run the web app](https://github.com/Expensify/Expensify.cash#running-the-web-app-via-production-api-proxy-contributors-) and how to [run the desktop/mobile apps](https://github.com/Expensify/Expensify.cash#running-the-desktop-and-mobile-apps-via-production-api-contributors-) locally using our production API.
This guide is specifically for external contributors. For a general overview of the repo, check out our README located [here](https://github.com/Expensify/Expensify.cash/blob/master/README.md). The part of the README to pay particular attention to is how to [run the app](https://github.com/Expensify/Expensify.cash#running-the-apps-via-production-api-proxy-contributors-) locally using our production API.

#### Test Accounts
You can create as many accounts as needed in order to test your changes. You can create your test accounts directly from [expensify.cash](https://expensify.cash/). Right now, accounts can't chat with each other by default. If you want your test accounts to be able to chat with each other, post in the #expensify-contributors [Slack channel](https://github.com/Expensify/Expensify.cash/blob/master/CONTRIBUTING.md#asking-questions) to ask someone to add your test accounts to a policy that allows chatting.
Expand All @@ -11,7 +11,7 @@ You can create as many accounts as needed in order to test your changes. You can
This project and everyone participating in it is governed by the Expensify [Code of Conduct](https://github.com/Expensify/Expensify.cash/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [contributors@expensify.com](mailto:contributors@expensify.com).

## Asking Questions
The best way to ask questions is to join our #expensify-contributors Slack channel. To request an invite to the channel, just email contributors@expensify.com with the subject "Slack Channel Invite" and we'll send you an invite! Please do not create issues to ask questions.
The best way to ask questions is to join our #expensify-contributors Slack channel. To request an invite to the channel, just email contributors@expensify.com with the subject "Slack Channel Invite" and we'll send you an invite! Please do not create issues to ask questions.

## Reporting Vulnerabilities
If you've found a vulnerability, please email security@expensify.com with the subject `Vulnerability Report` instead of creating an issue.
Expand All @@ -20,12 +20,12 @@ If you've found a vulnerability, please email security@expensify.com with the su
If you'd like to create a new issue, please first make sure the issue does not exist in the [issue list](https://github.com/Expensify/Expensify.cash/issues). When creating a new issue, please include all the required information on the issue template.

## Payment for Contributions
We are currently managing payment via Upwork. If you'd like to be paid for your contributions, please apply to fix the issue from our [Upwork issue list](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Each issue in this repo will also link out to the associated Upwork job.
We are currently managing payment via Upwork. If you'd like to be paid for your contributions, please apply to fix the issue from our [Upwork issue list](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Each issue in this repo will also link out to the associated Upwork job.

## Submitting a Pull Request
#### Proposing a Change
1. Fork this repository and create a new branch
1. [Open a PR](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) and be sure to fill in all the required information on the PR template.
1. [Open a PR](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Be sure to fill in all the required information on the PR template, and be sure all of your [commits are signed](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/signing-commits).
1. An Expensify engineer will be automatically assigned to review your PR
1. You will need all checks to pass:
1. CLA - You must sign our [Contributor License Agreement](https://github.com/Expensify/Expensify.cash/blob/master/CLA.md) by following the CLA bot instructions that will be posted on your PR
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<div align="center">
<img src="https://use.expensify.com/assets/logo/download/expensify-app-logo_circular/expensify-app-logo_circular.png" width="64" height="64">
<a href="https://Expensify.cash">
<img src="https://raw.githubusercontent.com/Expensify/Expensify.cash/master/web/favicon.png" width="64" height="64" alt="Expensify.cash Icon">
</a>
<h1>
<a href="https://Expensify.cash">
Expensify.cash
</a>
</h1>
</div>

# [Expensify.cash](https://Expensify.cash)

## Philosophy
This application is built with the following principles.
1. **Data Flow** - Ideally, this is how data flows through the app:
Expand Down Expand Up @@ -92,16 +97,14 @@ Now, all of your API calls will be using the ngrok route.
## Running the MacOS desktop app 🖥
* To run the **Development app**, run: `npm run desktop`, this will start a new Electron process running on your MacOS desktop in the `dist/Mac` folder.

## Running the web app via production API proxy (Contributors) 🧑‍💻
## Running the apps via production API proxy (Contributors) 🧑‍💻
If you don't have full-access to Expensify's development environment you will need to run the app against the production API.
* Copy the `.env.production` variables into your `.env` file
* Set `EXPENSIFY_URL_COM` environment variable to be empty (**Note:** this means it should be `EXPENSIFY_URL_COM=`, not completely omitted)
* Run the **Development Server**: `npm run proxy`

## Running the desktop and mobile apps via production API (Contributors) 🧑‍💻
If you don't have full-access to Expensify's development environment you will need to run the app against the production API.
* Copy the `.env.production` variables into your `.env` file (**Note:** Reset `EXPENSIFY_URL_COM` if you previously deleted it)
* Run the desktop, iOS, or Android builds via `npm run desktop`, `npm run ios`, `npm run android` respectively
* To run the web app, run the **Development Server**: `npm run proxy`
* To run the desktop app: `npm run desktop`
* To run the iOS app: `npm run ios`
* To run the Android app: `npm run android`

## Running the tests 🎰
### Unit tests
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 281
versionName "1.0.1-280"
versionCode 292
versionName "1.0.1-291"
}
splits {
abi {
Expand Down
Binary file modified android/app/src/main/res/drawable-hdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/expensify-logo-round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/welcome-screenshot-wide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/welcome-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"size" : "40x40"
},
{
"filename" : "iOSIcon@2x.png",
"filename" : "iOS@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "iOSIcon@3x.png",
"filename" : "iOS@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
Expand Down Expand Up @@ -91,7 +91,7 @@
"size" : "83.5x83.5"
},
{
"filename" : "iOSIcon_AppStore@2x.png",
"filename" : "Store.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ios/ExpensifyCash/Images.xcassets/AppIcon.appiconset/iPad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>281</string>
<string>292</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false />
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>281</string>
<string>292</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ PODS:
- React
- react-native-safe-area-context (3.1.8):
- React-Core
- react-native-webview (10.10.0):
- react-native-webview (11.0.2):
- React-Core
- React-RCTActionSheet (0.63.3):
- React-Core/RCTActionSheetHeaders (= 0.63.3)
Expand Down Expand Up @@ -649,7 +649,7 @@ SPEC CHECKSUMS:
react-native-progress-bar-android: ce95a69f11ac580799021633071368d08aaf9ad8
react-native-progress-view: 5816e8a6be812c2b122c6225a2a3db82d9008640
react-native-safe-area-context: 01158a92c300895d79dee447e980672dc3fb85a6
react-native-webview: 2e330b109bfd610e9818bf7865d1979f898960a7
react-native-webview: b2542d6fd424bcc3e3b2ec5f854f0abb4ec86c87
React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa
React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2
React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40
Expand Down
59 changes: 56 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.1-280",
"version": "1.0.1-291",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -42,7 +42,7 @@
"electron-log": "^4.2.4",
"electron-serve": "^1.0.0",
"electron-updater": "^4.3.4",
"expensify-common": "git+https://github.com/Expensify/expensify-common.git#cd9f195ed1fd340e7e890c41672a97af4f2956ca",
"expensify-common": "git+https://github.com/Expensify/expensify-common.git#d1bfacca6fb92f7e89a2a9cdf0863fad6481c0f2",
"file-loader": "^6.0.0",
"html-entities": "^1.3.1",
"lodash.get": "^4.4.2",
Expand Down
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const CONST = {
CLOUDFRONT_URL,
PDF_VIEWER_URL: '/pdf/web/viewer.html',
EXPENSIFY_ICON_URL: `${CLOUDFRONT_URL}/images/favicon-2019.png`,
UPWORK_URL: 'https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&user_location_match=2',
REPORT: {
SINGLE_USER_DM: 'singleUserDM',
GROUP_USERS_DM: 'groupUsersDM',
Expand Down
19 changes: 14 additions & 5 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {recordCurrentlyViewedReportID, recordCurrentRoute} from './libs/actions/
import HomePage from './pages/home/HomePage';
import NotFoundPage from './pages/NotFound';
import SetPasswordPage from './pages/SetPasswordPage';
import SignInPage from './pages/SignInPage';
import SignInPage from './pages/signin/SignInPage';
import listenToStorageEvents from './libs/listenToStorageEvents';
import * as ActiveClientManager from './libs/ActiveClientManager';
import ONYXKEYS from './ONYXKEYS';
Expand Down Expand Up @@ -104,12 +104,11 @@ class Expensify extends Component {
<View style={styles.genericView} />
);
}
const redirectTo = !this.state.authToken ? ROUTES.SIGNIN : this.props.redirectTo;
return (
<Router>
{/* If there is ever a property for redirecting, we do the redirect here */}
{/* Leave this as a ternary or else iOS throws an error about text not being wrapped in <Text> */}
{redirectTo ? <Redirect push to={redirectTo} /> : null}
{this.props.redirectTo ? <Redirect push to={this.props.redirectTo} /> : null}
<Route path="*" render={recordCurrentRoute} />

{/* We must record the currentlyViewedReportID when hitting the 404 page so */}
Expand All @@ -119,17 +118,27 @@ class Expensify extends Component {
<Switch>
<Route
exact
path="/"
path={ROUTES.ROOT}
render={() => (
this.state.authToken
? <Redirect to={ROUTES.HOME} />
: <Redirect to={ROUTES.SIGNIN} />
)}
/>

<Route path={[ROUTES.SET_PASSWORD]} component={SetPasswordPage} />
<Route path={[ROUTES.NOT_FOUND]} component={NotFoundPage} />
<Route path={[ROUTES.SIGNIN_WITH_EXITTO, ROUTES.SIGNIN]} component={SignInPage} />
<Route path={[ROUTES.HOME, ROUTES.ROOT]} component={HomePage} />
<Route
path={[ROUTES.HOME, ROUTES.ROOT]}
render={match => (

// Need to do this for every page that the user needs to be logged in to access
this.state.authToken
? <HomePage match={match} />
: <Redirect to={ROUTES.SIGNIN} />
)}
/>
</Switch>
</Router>
);
Expand Down
5 changes: 5 additions & 0 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
* This is a file containing constants for all the top level keys in our store
*/
export default {
// Holds information about the users account that is logging in
ACCOUNT: 'account',

// Holds an array of client IDs which is used for multi-tabs on web in order to know
// which tab is the leader, and which ones are the followers
ACTIVE_CLIENTS: 'activeClients2',

// When this key is changed, the active page changes (see Expensify.js and `redirect` in actions/App.js)
Expand Down
Loading

0 comments on commit 6641dc9

Please sign in to comment.