Revert "fix: make identify call to pass missing user_id (#774)" (#776)

This reverts commit 93dcd8f16e.
This commit is contained in:
Syed Sajjad Hussain Shah
2023-03-13 09:38:07 +05:00
committed by GitHub
parent a611451233
commit 2d3c5ed761
2 changed files with 2 additions and 9 deletions

View File

@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { getConfig, snakeCaseObject } from '@edx/frontend-platform';
import { identifyAuthenticatedUser, sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics';
import { sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics';
import {
AxiosJwtAuthService,
configure as configureAuth,
@@ -64,10 +64,9 @@ const ProgressiveProfiling = (props) => {
if (registrationResponse) {
setRegistrationResult(registrationResponse);
identifyAuthenticatedUser(authenticatedUser?.userId);
sendPageEvent('login_and_registration', 'welcome');
}
}, [authenticatedUser, DASHBOARD_URL, registrationResponse]);
}, [DASHBOARD_URL, registrationResponse]);
useEffect(() => {
if (registrationResponse) {

View File

@@ -27,7 +27,6 @@ jest.mock('@edx/frontend-platform/logging');
analytics.sendTrackEvent = jest.fn();
analytics.sendPageEvent = jest.fn();
analytics.identifyAuthenticatedUser = jest.fn();
logging.getLoggingService = jest.fn();
auth.configure = jest.fn();
@@ -128,11 +127,6 @@ describe('ProgressiveProfilingTests', () => {
expect(progressiveProfilingPage.find('#gender').exists()).toBeTruthy();
});
it('should make identify call to segment on progressive profiling page', async () => {
await getProgressiveProfilingPage();
expect(analytics.identifyAuthenticatedUser).toHaveBeenCalled();
});
it('should submit user profile details on form submission', async () => {
auth.getAuthenticatedUser = jest.fn(() => ({ userId: 3, username: 'abc123' }));
const formPayload = {