diff --git a/src/forgot-password/ForgotPasswordPage.jsx b/src/forgot-password/ForgotPasswordPage.jsx index 60fd3eeb..9d0f1267 100644 --- a/src/forgot-password/ForgotPasswordPage.jsx +++ b/src/forgot-password/ForgotPasswordPage.jsx @@ -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 ( { diff --git a/src/forgot-password/tests/ForgotPasswordPage.test.jsx b/src/forgot-password/tests/ForgotPasswordPage.test.jsx index 178f266c..ef0fb04c 100644 --- a/src/forgot-password/tests/ForgotPasswordPage.test.jsx +++ b/src/forgot-password/tests/ForgotPasswordPage.test.jsx @@ -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();