Merge pull request #95 from edx/adeel/add_missing_event_forgotpass_page
Adds missing GA event for forgot-password.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { sendPageEvent } from '@edx/frontend-platform/analytics';
|
||||
import { connect } from 'react-redux';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import {
|
||||
@@ -35,6 +36,8 @@ const ForgotPasswordPage = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
sendPageEvent('login_and_registration', 'reset');
|
||||
|
||||
return (
|
||||
<Formik
|
||||
onSubmit={(values) => {
|
||||
|
||||
@@ -7,10 +7,14 @@ import { mount } from 'enzyme';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { IntlProvider, injectIntl } from '@edx/frontend-platform/i18n';
|
||||
import * as analytics from '@edx/frontend-platform/analytics';
|
||||
|
||||
import ForgotPasswordPage from '../ForgotPasswordPage';
|
||||
|
||||
jest.mock('../data/selectors', () => jest.fn().mockImplementation(() => ({ forgotPasswordSelector: () => ({}) })));
|
||||
jest.mock('@edx/frontend-platform/analytics');
|
||||
|
||||
analytics.sendPageEvent = jest.fn();
|
||||
|
||||
const IntlForgotPasswordPage = injectIntl(ForgotPasswordPage);
|
||||
const mockStore = configureStore();
|
||||
|
||||
Reference in New Issue
Block a user