From eb6946c2432d7ac572871ee883e28e902f7a0e15 Mon Sep 17 00:00:00 2001 From: Ahtesham Quraish Date: Tue, 20 Aug 2024 14:04:00 +0500 Subject: [PATCH] fix: convert totalRegistrationTime to snake case Description: Convert totalRegistrationTime to snake case VAN-1816 --- src/forms/registration-popup/index.jsx | 2 +- .../registration-popup/tests/RegistrationPopup.test.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/forms/registration-popup/index.jsx b/src/forms/registration-popup/index.jsx index a3852d8..939f183 100644 --- a/src/forms/registration-popup/index.jsx +++ b/src/forms/registration-popup/index.jsx @@ -283,8 +283,8 @@ const RegistrationForm = () => { payload = { ...onboardingComponentContext, ...queryParams, ...payload, }; - payload = snakeCaseObject(payload); payload.totalRegistrationTime = totalRegistrationTime; + payload = snakeCaseObject(payload); dispatch(registerUser(payload)); }; diff --git a/src/forms/registration-popup/tests/RegistrationPopup.test.jsx b/src/forms/registration-popup/tests/RegistrationPopup.test.jsx index 66fa00c..a6d29ae 100644 --- a/src/forms/registration-popup/tests/RegistrationPopup.test.jsx +++ b/src/forms/registration-popup/tests/RegistrationPopup.test.jsx @@ -109,7 +109,7 @@ describe('RegistrationForm Test', () => { marketing_emails_opt_in: true, honor_code: true, terms_of_service: true, - totalRegistrationTime: 0, + total_registration_time: 0, app_name: 'onboarding_component', }; const { container } = render(reduxWrapper()); @@ -144,7 +144,7 @@ describe('RegistrationForm Test', () => { honor_code: true, terms_of_service: true, country: 'US', - totalRegistrationTime: 0, + total_registration_time: 0, app_name: 'onboarding_component', }; const { container } = render(reduxWrapper()); @@ -171,7 +171,7 @@ describe('RegistrationForm Test', () => { email: 'petro @example.com', password: 'password1', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch);