forked from Ivasoft/mattermost-mobile
Compare commits
4 Commits
v1.23.0
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa5ecaf417 | ||
|
|
65cad4c562 | ||
|
|
290e65ac57 | ||
|
|
20a2078377 |
23
.circleci/config.yml
Normal file
23
.circleci/config.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
version: 2.1
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
working_directory: ~/mattermost-mobile
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: |
|
||||||
|
echo assets/base/config.json
|
||||||
|
cat assets/base/config.json
|
||||||
|
# Avoid installing pods
|
||||||
|
touch .podinstall
|
||||||
|
# Run tests
|
||||||
|
make test || exit 1
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
pr-test:
|
||||||
|
jobs:
|
||||||
|
- test
|
||||||
@@ -123,8 +123,8 @@ android {
|
|||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
|
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
|
||||||
versionCode 230
|
versionName "1.23.1"
|
||||||
versionName "1.23.0"
|
versionCode 234
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
|
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
|
||||||
|
|||||||
@@ -299,30 +299,33 @@ export default class PostList extends PureComponent {
|
|||||||
|
|
||||||
scrollToBottom = () => {
|
scrollToBottom = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.flatListRef && this.flatListRef.current) {
|
if (this.flatListRef.current) {
|
||||||
this.flatListRef.current.scrollToOffset({offset: 0, animated: true});
|
this.flatListRef.current.scrollToOffset({offset: 0, animated: true});
|
||||||
}
|
}
|
||||||
}, 250);
|
}, 250);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flatListScrollToIndex = (index) => {
|
||||||
|
this.flatListRef.current.scrollToIndex({
|
||||||
|
animated: false,
|
||||||
|
index,
|
||||||
|
viewOffset: 0,
|
||||||
|
viewPosition: 1, // 0 is at bottom
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
scrollToIndex = (index) => {
|
scrollToIndex = (index) => {
|
||||||
if (this.flatListRef?.current) {
|
this.animationFrameInitialIndex = requestAnimationFrame(() => {
|
||||||
this.animationFrameInitialIndex = requestAnimationFrame(() => {
|
if (this.flatListRef.current && index > 0 && index <= this.getItemCount()) {
|
||||||
this.flatListRef.current.scrollToIndex({
|
this.flatListScrollToIndex(index);
|
||||||
animated: false,
|
}
|
||||||
index,
|
});
|
||||||
viewOffset: 0,
|
|
||||||
viewPosition: 1, // 0 is at bottom
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
scrollToInitialIndexIfNeeded = (index, count = 0) => {
|
scrollToInitialIndexIfNeeded = (index, count = 0) => {
|
||||||
if (!this.hasDoneInitialScroll && this.flatListRef?.current) {
|
if (!this.hasDoneInitialScroll) {
|
||||||
this.hasDoneInitialScroll = true;
|
|
||||||
|
|
||||||
if (index > 0 && index <= this.getItemCount()) {
|
if (index > 0 && index <= this.getItemCount()) {
|
||||||
|
this.hasDoneInitialScroll = true;
|
||||||
this.scrollToIndex(index);
|
this.scrollToIndex(index);
|
||||||
} else if (count < 3) {
|
} else if (count < 3) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -55,4 +55,32 @@ describe('PostList', () => {
|
|||||||
expect(baseProps.actions.handleSelectChannelByName).toHaveBeenCalled();
|
expect(baseProps.actions.handleSelectChannelByName).toHaveBeenCalled();
|
||||||
expect(wrapper.getElement()).toMatchSnapshot();
|
expect(wrapper.getElement()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should call flatListScrollToIndex only when ref is set and index is in range', () => {
|
||||||
|
jest.spyOn(global, 'requestAnimationFrame').mockImplementation((cb) => cb());
|
||||||
|
|
||||||
|
const instance = wrapper.instance();
|
||||||
|
const flatListScrollToIndex = jest.spyOn(instance, 'flatListScrollToIndex');
|
||||||
|
const indexInRange = baseProps.postIds.length;
|
||||||
|
const indexOutOfRange = [-1, indexInRange + 1];
|
||||||
|
|
||||||
|
instance.flatListRef = {
|
||||||
|
current: null,
|
||||||
|
};
|
||||||
|
instance.scrollToIndex(indexInRange);
|
||||||
|
expect(flatListScrollToIndex).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
instance.flatListRef = {
|
||||||
|
current: {
|
||||||
|
scrollToIndex: jest.fn(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
for (const index of indexOutOfRange) {
|
||||||
|
instance.scrollToIndex(index);
|
||||||
|
expect(flatListScrollToIndex).not.toHaveBeenCalled();
|
||||||
|
}
|
||||||
|
|
||||||
|
instance.scrollToIndex(indexInRange);
|
||||||
|
expect(flatListScrollToIndex).toHaveBeenCalled();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -108,12 +108,8 @@ function loadTranslation(locale) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let momentLocale = DEFAULT_LOCALE;
|
export function resetMomentLocale() {
|
||||||
|
moment.locale(DEFAULT_LOCALE);
|
||||||
function setMomentLocale(locale) {
|
|
||||||
if (momentLocale !== locale) {
|
|
||||||
momentLocale = moment.locale(locale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTranslations(locale) {
|
export function getTranslations(locale) {
|
||||||
@@ -121,8 +117,6 @@ export function getTranslations(locale) {
|
|||||||
loadTranslation(locale);
|
loadTranslation(locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
setMomentLocale(locale.toLowerCase());
|
|
||||||
|
|
||||||
return TRANSLATIONS[locale] || TRANSLATIONS[DEFAULT_LOCALE];
|
return TRANSLATIONS[locale] || TRANSLATIONS[DEFAULT_LOCALE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {selectDefaultChannel} from 'app/actions/views/channel';
|
|||||||
import {showOverlay} from 'app/actions/navigation';
|
import {showOverlay} from 'app/actions/navigation';
|
||||||
import {loadConfigAndLicense, setDeepLinkURL, startDataCleanup} from 'app/actions/views/root';
|
import {loadConfigAndLicense, setDeepLinkURL, startDataCleanup} from 'app/actions/views/root';
|
||||||
import {NavigationTypes, ViewTypes} from 'app/constants';
|
import {NavigationTypes, ViewTypes} from 'app/constants';
|
||||||
import {getTranslations} from 'app/i18n';
|
import {getTranslations, resetMomentLocale} from 'app/i18n';
|
||||||
import mattermostManaged from 'app/mattermost_managed';
|
import mattermostManaged from 'app/mattermost_managed';
|
||||||
import PushNotifications from 'app/push_notifications';
|
import PushNotifications from 'app/push_notifications';
|
||||||
import {getCurrentLocale} from 'app/selectors/i18n';
|
import {getCurrentLocale} from 'app/selectors/i18n';
|
||||||
@@ -40,7 +40,6 @@ class GlobalEventHandler {
|
|||||||
EventEmitter.on(General.SERVER_VERSION_CHANGED, this.onServerVersionChanged);
|
EventEmitter.on(General.SERVER_VERSION_CHANGED, this.onServerVersionChanged);
|
||||||
EventEmitter.on(General.CONFIG_CHANGED, this.onServerConfigChanged);
|
EventEmitter.on(General.CONFIG_CHANGED, this.onServerConfigChanged);
|
||||||
EventEmitter.on(General.SWITCH_TO_DEFAULT_CHANNEL, this.onSwitchToDefaultChannel);
|
EventEmitter.on(General.SWITCH_TO_DEFAULT_CHANNEL, this.onSwitchToDefaultChannel);
|
||||||
this.turnOnInAppNotificationHandling();
|
|
||||||
Dimensions.addEventListener('change', this.onOrientationChange);
|
Dimensions.addEventListener('change', this.onOrientationChange);
|
||||||
AppState.addEventListener('change', this.onAppStateChange);
|
AppState.addEventListener('change', this.onAppStateChange);
|
||||||
Linking.addEventListener('url', this.onDeepLink);
|
Linking.addEventListener('url', this.onDeepLink);
|
||||||
@@ -77,6 +76,10 @@ class GlobalEventHandler {
|
|||||||
this.store = opts.store;
|
this.store = opts.store;
|
||||||
this.launchApp = opts.launchApp;
|
this.launchApp = opts.launchApp;
|
||||||
|
|
||||||
|
// onAppStateChange may be called by the AppState listener before we
|
||||||
|
// configure the global event handler so we manually call it here
|
||||||
|
this.onAppStateChange('active');
|
||||||
|
|
||||||
const window = Dimensions.get('window');
|
const window = Dimensions.get('window');
|
||||||
this.onOrientationChange({window});
|
this.onOrientationChange({window});
|
||||||
|
|
||||||
@@ -113,12 +116,12 @@ class GlobalEventHandler {
|
|||||||
|
|
||||||
if (this.store) {
|
if (this.store) {
|
||||||
this.store.dispatch(setAppState(isActive));
|
this.store.dispatch(setAppState(isActive));
|
||||||
}
|
|
||||||
|
|
||||||
if (isActive && emmProvider.previousAppState === 'background') {
|
if (isActive && (!emmProvider.enabled || emmProvider.previousAppState === 'background')) {
|
||||||
this.appActive();
|
this.appActive();
|
||||||
} else if (isBackground) {
|
} else if (isBackground) {
|
||||||
this.appInactive();
|
this.appInactive();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emmProvider.previousAppState = appState;
|
emmProvider.previousAppState = appState;
|
||||||
@@ -142,6 +145,7 @@ class GlobalEventHandler {
|
|||||||
this.store.dispatch(setServerVersion(''));
|
this.store.dispatch(setServerVersion(''));
|
||||||
deleteFileCache();
|
deleteFileCache();
|
||||||
removeAppCredentials();
|
removeAppCredentials();
|
||||||
|
resetMomentLocale();
|
||||||
|
|
||||||
PushNotifications.clearNotifications();
|
PushNotifications.clearNotifications();
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import thunk from 'redux-thunk';
|
|||||||
|
|
||||||
import intitialState from 'app/initial_state';
|
import intitialState from 'app/initial_state';
|
||||||
import PushNotification from 'app/push_notifications';
|
import PushNotification from 'app/push_notifications';
|
||||||
|
import * as I18n from 'app/i18n';
|
||||||
|
|
||||||
import GlobalEventHandler from './global_event_handler';
|
import GlobalEventHandler from './global_event_handler';
|
||||||
|
|
||||||
@@ -15,6 +16,12 @@ jest.mock('app/init/credentials', () => ({
|
|||||||
removeAppCredentials: jest.fn(),
|
removeAppCredentials: jest.fn(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
jest.mock('app/utils/error_handling', () => ({
|
||||||
|
default: {
|
||||||
|
initializeErrorHandling: jest.fn(),
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
jest.mock('react-native-notifications', () => ({
|
jest.mock('react-native-notifications', () => ({
|
||||||
addEventListener: jest.fn(),
|
addEventListener: jest.fn(),
|
||||||
cancelAllLocalNotifications: jest.fn(),
|
cancelAllLocalNotifications: jest.fn(),
|
||||||
@@ -29,10 +36,54 @@ GlobalEventHandler.store = store;
|
|||||||
|
|
||||||
// TODO: Add Android test as part of https://mattermost.atlassian.net/browse/MM-17110
|
// TODO: Add Android test as part of https://mattermost.atlassian.net/browse/MM-17110
|
||||||
describe('GlobalEventHandler', () => {
|
describe('GlobalEventHandler', () => {
|
||||||
it('should clear notifications on logout', async () => {
|
it('should clear notifications and reset moment locale on logout', async () => {
|
||||||
const clearNotifications = jest.spyOn(PushNotification, 'clearNotifications');
|
const clearNotifications = jest.spyOn(PushNotification, 'clearNotifications');
|
||||||
|
const resetMomentLocale = jest.spyOn(I18n, 'resetMomentLocale');
|
||||||
|
|
||||||
await GlobalEventHandler.onLogout();
|
await GlobalEventHandler.onLogout();
|
||||||
expect(clearNotifications).toHaveBeenCalled();
|
expect(clearNotifications).toHaveBeenCalled();
|
||||||
|
expect(resetMomentLocale).toHaveBeenCalledWith();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call onAppStateChange after configuration', () => {
|
||||||
|
const onAppStateChange = jest.spyOn(GlobalEventHandler, 'onAppStateChange');
|
||||||
|
|
||||||
|
GlobalEventHandler.configure({store});
|
||||||
|
expect(GlobalEventHandler.store).not.toBeNull();
|
||||||
|
expect(onAppStateChange).toHaveBeenCalledWith('active');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle onAppStateChange to active if the store set', () => {
|
||||||
|
const appActive = jest.spyOn(GlobalEventHandler, 'appActive');
|
||||||
|
const appInactive = jest.spyOn(GlobalEventHandler, 'appInactive');
|
||||||
|
expect(GlobalEventHandler.store).not.toBeNull();
|
||||||
|
|
||||||
|
GlobalEventHandler.onAppStateChange('active');
|
||||||
|
expect(appActive).toHaveBeenCalled();
|
||||||
|
expect(appInactive).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle onAppStateChange to background if the store set', () => {
|
||||||
|
const appActive = jest.spyOn(GlobalEventHandler, 'appActive');
|
||||||
|
const appInactive = jest.spyOn(GlobalEventHandler, 'appInactive');
|
||||||
|
expect(GlobalEventHandler.store).not.toBeNull();
|
||||||
|
|
||||||
|
GlobalEventHandler.onAppStateChange('background');
|
||||||
|
expect(appActive).not.toHaveBeenCalled();
|
||||||
|
expect(appInactive).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not handle onAppStateChange if the store is not set', () => {
|
||||||
|
const appActive = jest.spyOn(GlobalEventHandler, 'appActive');
|
||||||
|
const appInactive = jest.spyOn(GlobalEventHandler, 'appInactive');
|
||||||
|
GlobalEventHandler.store = null;
|
||||||
|
|
||||||
|
GlobalEventHandler.onAppStateChange('active');
|
||||||
|
expect(appActive).not.toHaveBeenCalled();
|
||||||
|
expect(appInactive).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
GlobalEventHandler.onAppStateChange('background');
|
||||||
|
expect(appActive).not.toHaveBeenCalled();
|
||||||
|
expect(appInactive).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2785,7 +2785,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CURRENT_PROJECT_VERSION = 230;
|
CURRENT_PROJECT_VERSION = 234;
|
||||||
DEAD_CODE_STRIPPING = NO;
|
DEAD_CODE_STRIPPING = NO;
|
||||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
@@ -2845,7 +2845,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CURRENT_PROJECT_VERSION = 230;
|
CURRENT_PROJECT_VERSION = 234;
|
||||||
DEAD_CODE_STRIPPING = NO;
|
DEAD_CODE_STRIPPING = NO;
|
||||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.23.0</string>
|
<string>1.23.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>230</string>
|
<string>234</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
@@ -56,6 +56,8 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>NSAppleMusicUsageDescription</key>
|
<key>NSAppleMusicUsageDescription</key>
|
||||||
<string>Let Mattermost access your Media files</string>
|
<string>Let Mattermost access your Media files</string>
|
||||||
|
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||||
|
<string>Share post data <span class="x x-first x-last">across</span> devices with Mattermost</string>
|
||||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||||
<string>Share post data accross devices with Mattermost</string>
|
<string>Share post data accross devices with Mattermost</string>
|
||||||
<key>NSCalendarsUsageDescription</key>
|
<key>NSCalendarsUsageDescription</key>
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>XPC!</string>
|
<string>XPC!</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.23.0</string>
|
<string>1.23.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>230</string>
|
<string>234</string>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.23.0</string>
|
<string>1.23.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>230</string>
|
<string>234</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>XPC!</string>
|
<string>XPC!</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.23.0</string>
|
<string>1.23.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>230</string>
|
<string>234</string>
|
||||||
<key>NSExtension</key>
|
<key>NSExtension</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSExtensionPointIdentifier</key>
|
<key>NSExtensionPointIdentifier</key>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mattermost-mobile",
|
"name": "mattermost-mobile",
|
||||||
"version": "1.23.0",
|
"version": "1.23.1",
|
||||||
"description": "Mattermost Mobile with React Native",
|
"description": "Mattermost Mobile with React Native",
|
||||||
"repository": "git@github.com:mattermost/mattermost-mobile.git",
|
"repository": "git@github.com:mattermost/mattermost-mobile.git",
|
||||||
"author": "Mattermost, Inc.",
|
"author": "Mattermost, Inc.",
|
||||||
@@ -147,4 +147,4 @@
|
|||||||
"node_modules/(?!react-native|jail-monkey)"
|
"node_modules/(?!react-native|jail-monkey)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,6 +43,9 @@ jest.mock('NativeModules', () => {
|
|||||||
addEventListener: jest.fn(),
|
addEventListener: jest.fn(),
|
||||||
getCurrentState: jest.fn().mockResolvedValue({isConnected: true}),
|
getCurrentState: jest.fn().mockResolvedValue({isConnected: true}),
|
||||||
},
|
},
|
||||||
|
StatusBarManager: {
|
||||||
|
getHeight: jest.fn(),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
jest.mock('NativeEventEmitter');
|
jest.mock('NativeEventEmitter');
|
||||||
|
|||||||
Reference in New Issue
Block a user