Skip to content

Commit

Permalink
Merge branch 'main' into maddylewis-patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
maddylewis authored Feb 16, 2024
2 parents f2655d1 + b7418b9 commit 418fab8
Show file tree
Hide file tree
Showing 174 changed files with 3,775 additions and 1,312 deletions.
4 changes: 2 additions & 2 deletions .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down
4 changes: 2 additions & 2 deletions .github/libs/versionUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const incrementPatch = (major, minor, patch) => {
/**
* Increments a build version
*
* @param {Number} version
* @param {Number} level
* @param {String} version
* @param {String} level
* @returns {String}
*/
const incrementVersion = (version, level) => {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
status: custom
custom_payload: |
{
channel: '#expensify-margelo',
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `💥 ${process.env.AS_REPO} E2E Test run failed failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ tsconfig.tsbuildinfo
.yalc
yalc.lock

# Expo
.expo
dist/
web-build/

# Local https certificate/key
config/webpack/*.pem

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ For an M1 Mac, read this [SO](https://stackoverflow.com/questions/64901180/how-t
* To run a on a **Development Simulator**: `npm run ios`
* Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile

If you want to run the app on an actual physical iOS device, please follow the instructions [here](https://github.com/Expensify/App/blob/docs/how-to-build-app-on-physcial-device/contributingGuides/HOW_TO_BUILD_APP_ON_PHYSICAL_IOS_DEVICE.md).

## Running the Android app 🤖
* Before installing Android dependencies, you need to obtain a token from Mapbox to download their SDKs. Please run `npm run configure-mapbox` and follow the instructions. If you already did this step for iOS, there is no need to repeat this step.
* Go through the official React-Native instructions on [this page](https://reactnative.dev/docs/environment-setup?guide=native&platform=android) to start running the app on android.
Expand Down
42 changes: 0 additions & 42 deletions __mocks__/@ua/react-native-airship.js

This file was deleted.

53 changes: 53 additions & 0 deletions __mocks__/@ua/react-native-airship.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import type {AirshipContact, AirshipPush, AirshipPushAndroid, AirshipPushIOS, AirshipRoot} from '@ua/react-native-airship';
import {EventType as AirshipEventType, iOS as AirshipIOS} from '@ua/react-native-airship';

const EventType: Partial<typeof AirshipEventType> = {
NotificationResponse: AirshipEventType.NotificationResponse,
PushReceived: AirshipEventType.PushReceived,
};

const iOS: Partial<typeof AirshipIOS> = {
ForegroundPresentationOption: {
Sound: AirshipIOS.ForegroundPresentationOption.Sound,
Badge: AirshipIOS.ForegroundPresentationOption.Badge,
Banner: AirshipIOS.ForegroundPresentationOption.Banner,
List: AirshipIOS.ForegroundPresentationOption.List,
},
};

const pushIOS: AirshipPushIOS = jest.fn().mockImplementation(() => ({
setBadgeNumber: jest.fn(),
setForegroundPresentationOptions: jest.fn(),
setForegroundPresentationOptionsCallback: jest.fn(),
}))();

const pushAndroid: AirshipPushAndroid = jest.fn().mockImplementation(() => ({
setForegroundDisplayPredicate: jest.fn(),
}))();

const push: AirshipPush = jest.fn().mockImplementation(() => ({
iOS: pushIOS,
android: pushAndroid,
enableUserNotifications: () => Promise.resolve(false),
clearNotifications: jest.fn(),
getNotificationStatus: () => Promise.resolve({airshipOptIn: false, systemEnabled: false, airshipEnabled: false}),
getActiveNotifications: () => Promise.resolve([]),
}))();

const contact: AirshipContact = jest.fn().mockImplementation(() => ({
identify: jest.fn(),
getNamedUserId: () => Promise.resolve(undefined),
reset: jest.fn(),
module: jest.fn(),
}))();

const Airship: Partial<AirshipRoot> = {
addListener: jest.fn(),
removeAllListeners: jest.fn(),
push,
contact,
};

export default Airship;

export {EventType, iOS};
6 changes: 1 addition & 5 deletions assets/images/cards-and-domains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/expensify-logo-new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/images/fullscreen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/meter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/mute.svg
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 assets/images/new-expensify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/pause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 418fab8

Please sign in to comment.