forked from Ivasoft/mattermost-mobile
Refactor Open Profile (#8746)
* Refactor Open Profile * Add missing changes * Fix tests * Fix tests * Address feedback
This commit is contained in:
committed by
GitHub
parent
305fbee513
commit
af0a7525c8
@@ -94,6 +94,7 @@ jest.doMock('react-native', () => {
|
||||
InteractionManager: RNInteractionManager,
|
||||
NativeModules: RNNativeModules,
|
||||
Linking: RNLinking,
|
||||
Keyboard: RNKeyboard,
|
||||
} = ReactNative;
|
||||
|
||||
const Alert = {
|
||||
@@ -250,6 +251,14 @@ jest.doMock('react-native', () => {
|
||||
}),
|
||||
};
|
||||
|
||||
const Keyboard = {
|
||||
...RNKeyboard,
|
||||
dismiss: jest.fn(),
|
||||
addListener: jest.fn(() => ({
|
||||
remove: jest.fn(),
|
||||
})),
|
||||
};
|
||||
|
||||
return Object.setPrototypeOf({
|
||||
Platform: {
|
||||
...Platform,
|
||||
@@ -270,6 +279,7 @@ jest.doMock('react-native', () => {
|
||||
InteractionManager,
|
||||
NativeModules,
|
||||
Linking,
|
||||
Keyboard,
|
||||
Animated: {
|
||||
...ReactNative.Animated,
|
||||
timing: jest.fn(() => ({
|
||||
@@ -393,6 +403,7 @@ jest.mock('react-native-share', () => ({
|
||||
}));
|
||||
|
||||
jest.mock('@screens/navigation', () => ({
|
||||
...jest.requireActual('@screens/navigation'),
|
||||
resetToChannel: jest.fn(),
|
||||
resetToSelectServer: jest.fn(),
|
||||
resetToTeams: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user