Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Apr 22, 2023
2 parents da3fb81 + e8cec43 commit efe7757
Show file tree
Hide file tree
Showing 207 changed files with 2,434 additions and 1,720 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
Expand Down Expand Up @@ -121,6 +127,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
Expand Down Expand Up @@ -178,6 +190,12 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}
fetch-depth: 0

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Decrypt Developer ID Certificate
Expand All @@ -192,7 +210,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build desktop app for testing
run: npm run desktop-build-internal -- --publish always
run: npm run desktop-build-adhoc -- --publish always
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
Expand All @@ -214,6 +232,12 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }}

- name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it
run: |
cp .env.staging .env.adhoc
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main

- name: Configure AWS Credentials
Expand All @@ -223,7 +247,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build web for testing
run: npm run build-staging
run: npm run build-adhoc

- name: Build docs
run: npm run storybook-build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validateGithubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- .github/**

jobs:
verify:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- ios/**
- "package.json"
- "package-lock.json"

jobs:
verify:
Expand Down
3 changes: 3 additions & 0 deletions __mocks__/react-native-dev-menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
addItem: jest.fn(),
};
13 changes: 0 additions & 13 deletions __mocks__/react-native-key-command.js

This file was deleted.

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001030002
versionName "1.3.0-2"
versionCode 1001030400
versionName "1.3.4-0"
}

splits {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.expensify.chat;

import android.content.Context;
import com.facebook.react.ReactInstanceManager;

/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}
Binary file modified android/app/src/main/assets/fonts/ExpensifyMono-Bold.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyMono-Regular.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Bold.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-BoldItalic.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Italic.otf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/ExpensifyNeue-Regular.otf
Binary file not shown.
34 changes: 1 addition & 33 deletions android/app/src/main/java/com/expensify/chat/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import android.os.Bundle;
import android.content.pm.ActivityInfo;
import android.view.KeyEvent;
import com.expensify.chat.bootsplash.BootSplash;
import com.expensify.reactnativekeycommand.KeyCommandModule;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
Expand Down Expand Up @@ -46,34 +44,4 @@ protected void onCreate(Bundle savedInstanceState) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
}

/**
* This method is called when a key down event has occurred.
* Forwards the event to the KeyCommandModule
*/
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) {
return false;
}
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyDown(keyCode, event);
}

@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) { return false; }
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyLongPress(keyCode, event);
}

@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
// Disabling hardware ESCAPE support which is handled by Android
if (event.getKeyCode() == KeyEvent.KEYCODE_ESCAPE) { return false; }
KeyCommandModule.getInstance().onKeyDownEvent(keyCode, event);
return super.onKeyUp(keyCode, event);
}
}
}
12 changes: 6 additions & 6 deletions android/link-assets-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"data": [
{
"path": "assets/fonts/native/ExpensifyMono-Bold.otf",
"sha1": "6b83b1c1c0c8650f6258fd05771b4e25696c4046"
"sha1": "d70e12540200613e9e6ac9068bed57e4bf477bfe"
},
{
"path": "assets/fonts/native/ExpensifyMono-Regular.otf",
"sha1": "c0522536213e24609badc298ed82a6c47cdb5b20"
"sha1": "9bbd3795afea1b1136c5b6a8ecd7d470fd5ea1b2"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Bold.otf",
"sha1": "c61cccfb6091f06381fa5b514272eab7105246d8"
"sha1": "fba09dcd16261f9fd181a772e3f7879e5deafb7f"
},
{
"path": "assets/fonts/native/ExpensifyNeue-BoldItalic.otf",
"sha1": "039065b262036e708ebb5f64b236ef08cc4e8f4e"
"sha1": "fe3969031652a5160819514bd62c36acb8ef7d24"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Italic.otf",
"sha1": "7ddd0652175a9f27380fc63eec4395d65ed189eb"
"sha1": "e07eeb6fbabec2b46d708f59bccdacc5bbf8acbf"
},
{
"path": "assets/fonts/native/ExpensifyNeue-Regular.otf",
"sha1": "57b2cdd2f4adea3fad34464248502cd4edcaadd7"
"sha1": "32290ecbda86b5938c7538f6bf5c3106b43e5a6e"
},
{
"path": "assets/fonts/native/ExpensifyNewKansas-Medium.otf",
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-plaid-link-sdk'
project(':react-native-plaid-link-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-plaid-link-sdk/android')
include ':react-native-dev-menu'
project(':react-native-dev-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dev-menu/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
Binary file modified assets/fonts/native/ExpensifyMono-Bold.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyMono-Regular.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Bold.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-BoldItalic.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Italic.otf
Binary file not shown.
Binary file modified assets/fonts/native/ExpensifyNeue-Regular.otf
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Bold.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Bold.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Regular.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyMono-Regular.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Bold.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Bold.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-BoldItalic.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-BoldItalic.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Italic.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Italic.woff2
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Regular.woff
Binary file not shown.
Binary file modified assets/fonts/web/ExpensifyNeue-Regular.woff2
Binary file not shown.
50 changes: 50 additions & 0 deletions assets/images/new-expensify-adhoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions assets/images/task.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions config/electronBuilder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ const pullRequestNumber = process.env.PULL_REQUEST_NUMBER;
const s3Bucket = {
production: 'expensify-cash',
staging: 'staging-expensify-cash',
internal: 'ad-hoc-expensify-cash',
adhoc: 'ad-hoc-expensify-cash',
};

const s3Path = {
production: '/',
staging: '/',
internal: process.env.PULL_REQUEST_NUMBER
adhoc: process.env.PULL_REQUEST_NUMBER
? `/desktop/${pullRequestNumber}/`
: '/',
};

const macIcon = {
production: './desktop/icon.png',
staging: './desktop/icon-stg.png',
internal: './desktop/icon-stg.png',
adhoc: './desktop/icon-adhoc.png',
};

const isCorrectElectronEnv = ['production', 'staging', 'internal'].includes(
const isCorrectElectronEnv = ['production', 'staging', 'adhoc'].includes(
process.env.ELECTRON_ENV,
);

Expand Down
3 changes: 2 additions & 1 deletion config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const envToLogoSuffixMap = {
production: '',
staging: '-stg',
dev: '-dev',
adhoc: '-adhoc',
};

function mapEnvToLogoSuffix(envFile) {
Expand Down Expand Up @@ -120,7 +121,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
// React Native JavaScript environment requires the global __DEV__ variable to be accessible.
// react-native-render-html uses variable to log exclusively during development.
// See https://reactnative.dev/docs/javascript-environment
__DEV__: /staging|prod/.test(envFile) === false,
__DEV__: /staging|prod|adhoc/.test(envFile) === false,
}),

// This allows us to interactively inspect JS bundle contents
Expand Down
2 changes: 1 addition & 1 deletion contributingGuides/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Additionally if you want to discuss an idea with the open source community witho
3. If you cannot reproduce the problem, pause on this step and add a comment to the issue explaining where you are stuck or that you don't think the issue can be reproduced.

#### Propose a solution for the job
4. Do not propose solutions to jobs without the `Help Wanted` label applied. Any proposals submitted when that label is not present will not be reviewed.
4. You can propose solutions on any issue at at any time, but if you propose solutions to jobs before the `Help Wanted` label is applied, you do so at your own risk. Proposals will not be reviewed until the label is added and there is always a chance that we might not add the label or hire an external contributor for the job.
5. After you reproduce the issue, complete the [proposal template here](./PROPOSAL_TEMPLATE.md) and post it as a comment in the corresponding GitHub issue (linked in the Upwork job).
- Note: Before submitting a proposal on an issue, be sure to read any other existing proposals. ALL NEW PROPOSALS MUST BE DIFFERENT FROM EXISTING PROPOSALS. The *difference* should be important, meaningful or considerable.
6. Refrain from leaving additional comments until someone from the Contributor-Plus team and / or someone from Expensify provides feedback on your proposal (do not create a pull request yet).
Expand Down
16 changes: 16 additions & 0 deletions contributingGuides/REGRESSION_TEST_BEST_PRACTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ Welcome to the Regression Test Best Practices page! Thanks for taking the time t
## Context
We use a third party to run QA on our new application (the one you're helping build!) to catch bugs. When a bug is found, we then create a job available to our community of open-source contributors, and once the bug is successfully squashed, we want to ensure that the bug never comes back - because after all, the whole point of squashing a bug is to ensure it's dead! Therefore, we need to either create a new test case for our QA team to complete and make sure the bug doesn't come back, or update an existing test case to cover this scenario. Our QA tests are broken into various categories that cover the scenario taking place in the User Experience such as starting a new 1:1 chat, requesting money, or updating profile settings. Then we break down the scenario into _exact_ written steps for the QA team to replicate and ensure they get the correct result. This is where you come in!

## Determining if we should create a regression test for the bug

Before proposing test steps for a bug, we first need to determine whether or not we should create a test for it. In order to determine this, we look for these common traits:
- Is it easy to test for this bug?
- Is the bug related to an important user flow? (For example, adding a bank account)
- Is it an impactful bug?

If the answer is yes to all of those questions, you can feel confident that we should create a test for the bug.

If the answer is no to all of those questions, you can feel confident we shouldn't create a test for the bug.

Once you've come to an answer on determining if we should create a test or not, you'll then post a comment in the GH outlining your recommendation and your reasoning for why (short and sweet is fine!).
- Note: If you feel the answer is no to some, but not all, of the questions, trust your gut and proceed to post your recommendation and reasoning for it in the GH.

Once your decision is posted you can either move on to the below steps, or ensure the other items in the checklist are complete and wait to be paid!

## Formatting of regression test step proposals

#### Location and format of the proposal post
Expand Down
Binary file added desktop/icon-adhoc.png
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 desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const mainWindow = (() => {
if (__DEV__) {
console.debug('CONFIG: ', CONFIG);
app.dock.setIcon(`${__dirname}/../icon-dev.png`);
app.setName('New Expensify');
app.setName('New Expensify Dev');
}

app.on('will-finish-launching', () => {
Expand Down
Loading

0 comments on commit efe7757

Please sign in to comment.