From 2338762e0ef8f48aa463c5bb4d713bd70ae26694 Mon Sep 17 00:00:00 2001 From: Blue Date: Thu, 29 Aug 2024 12:57:25 +0500 Subject: [PATCH] fix: convert totalRegistrationTime to snake case (#133) Description: Convert totalRegistrationTime to snake case VAN-1816 Co-authored-by: Ahtesham Quraish --- 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);