From 2d3c5ed76114cf586362dec7920898b2cc05379f Mon Sep 17 00:00:00 2001 From: Syed Sajjad Hussain Shah <52817156+syedsajjadkazmii@users.noreply.github.com> Date: Mon, 13 Mar 2023 09:38:07 +0500 Subject: [PATCH] Revert "fix: make identify call to pass missing user_id (#774)" (#776) This reverts commit 93dcd8f16e72f8a4eceed6404f850e53d09f1967. --- src/progressive-profiling/ProgressiveProfiling.jsx | 5 ++--- .../tests/ProgressiveProfiling.test.jsx | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/progressive-profiling/ProgressiveProfiling.jsx b/src/progressive-profiling/ProgressiveProfiling.jsx index 28ff4a01..8fa31a88 100644 --- a/src/progressive-profiling/ProgressiveProfiling.jsx +++ b/src/progressive-profiling/ProgressiveProfiling.jsx @@ -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) { diff --git a/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx b/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx index 70ed0505..f5c51096 100644 --- a/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +++ b/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx @@ -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 = {