Merge pull request #95 from edx/adeel/add_missing_event_forgotpass_page

Adds missing GA event for forgot-password.
This commit is contained in:
adeel khan
2021-01-27 02:52:09 +05:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -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) => {

View File

@@ -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();