MM-19990 Prevent glimpse of the app if TOS not accepted (#3617)
This commit is contained in:
parent
a3c7b4707e
commit
46efa88bb4
2 changed files with 2 additions and 5 deletions
|
|
@ -19,7 +19,7 @@ import StatusBar from 'app/components/status_bar';
|
|||
import {getMarkdownTextStyles, getMarkdownBlockStyles} from 'app/utils/markdown';
|
||||
import {makeStyleSheetFromTheme, setNavigatorStyles} from 'app/utils/theme';
|
||||
|
||||
import {dismissModal, dismissAllModals, setButtons} from 'app/actions/navigation';
|
||||
import {dismissModal, setButtons} from 'app/actions/navigation';
|
||||
|
||||
export default class TermsOfService extends PureComponent {
|
||||
static propTypes = {
|
||||
|
|
@ -118,7 +118,6 @@ export default class TermsOfService extends PureComponent {
|
|||
closeTermsAndLogout = async () => {
|
||||
const {actions} = this.props;
|
||||
|
||||
await dismissAllModals();
|
||||
actions.logout();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,6 @@ describe('TermsOfService', () => {
|
|||
});
|
||||
|
||||
test('should call dismissAllModals on closeTermsAndLogout', () => {
|
||||
const dismissAllModals = jest.spyOn(NavigationActions, 'dismissAllModals');
|
||||
|
||||
const wrapper = shallow(
|
||||
<TermsOfService {...baseProps}/>,
|
||||
{context: {intl: {formatMessage: jest.fn()}}},
|
||||
|
|
@ -130,6 +128,6 @@ describe('TermsOfService', () => {
|
|||
|
||||
wrapper.setState({loading: false, termsId: 1, termsText: 'Terms Text'});
|
||||
wrapper.instance().closeTermsAndLogout();
|
||||
expect(dismissAllModals).toHaveBeenCalledTimes(1);
|
||||
expect(baseProps.actions.logout).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue