Disable logbox when RUNNING_E2E=true (#5831)
This commit is contained in:
parent
805b90205a
commit
19094f27eb
3 changed files with 8 additions and 1 deletions
1
.env
1
.env
|
|
@ -1,2 +1,3 @@
|
|||
STORYBOOK_PORT=
|
||||
STORYBOOK_HOST=
|
||||
RUNNING_E2E=
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Linking} from 'react-native';
|
||||
import {Linking, LogBox} from 'react-native';
|
||||
import {Navigation} from 'react-native-navigation';
|
||||
import {Provider} from 'react-redux';
|
||||
|
||||
|
|
@ -10,6 +10,7 @@ import {setDeepLinkURL} from '@actions/views/root';
|
|||
import {loadMe, logout} from '@actions/views/user';
|
||||
import {NavigationTypes} from '@constants';
|
||||
import {CHANNEL, THREAD} from '@constants/screen';
|
||||
import {RUNNING_E2E} from '@env';
|
||||
import {getAppCredentials} from '@init/credentials';
|
||||
import {setupPermanentSidebar} from '@init/device';
|
||||
import emmProvider from '@init/emm_provider';
|
||||
|
|
@ -154,3 +155,7 @@ export function componentDidDisappearListener({componentId}) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore all notifications if running e2e
|
||||
const isRunningE2e = RUNNING_E2E === 'true';
|
||||
LogBox.ignoreAllLogs(isRunningE2e);
|
||||
|
|
|
|||
1
env.d.ts
vendored
1
env.d.ts
vendored
|
|
@ -5,4 +5,5 @@
|
|||
declare module '@env' {
|
||||
export const STORYBOOK_HOST: string;
|
||||
export const STORYBOOK_PORT: number;
|
||||
export const RUNNING_E2E: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue