diff --git a/src/register/RegistrationPage.test.jsx b/src/register/RegistrationPage.test.jsx index 5633c753..5f23e2c2 100644 --- a/src/register/RegistrationPage.test.jsx +++ b/src/register/RegistrationPage.test.jsx @@ -188,7 +188,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, next: '/course/demo-course-url', app_name: APP_NAME, }; @@ -212,7 +212,7 @@ describe('RegistrationPage', () => { country: 'Pakistan', honor_code: true, social_auth_provider: 'Apple', - totalRegistrationTime: 0, + total_registration_time: 0, app_name: APP_NAME, }; @@ -246,7 +246,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Ukraine', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -271,7 +271,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Ukraine', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -297,7 +297,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, marketing_emails_opt_in: true, app_name: APP_NAME, }; @@ -325,7 +325,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, app_name: APP_NAME, }; @@ -891,7 +891,7 @@ describe('RegistrationPage', () => { email: 'john.doe@example.com', country: 'PK', social_auth_provider: 'Apple', - totalRegistrationTime: 0, + total_registration_time: 0, app_name: APP_NAME, })); }); diff --git a/src/register/components/tests/ConfigurableRegistrationForm.test.jsx b/src/register/components/tests/ConfigurableRegistrationForm.test.jsx index 670415f7..61a25848 100644 --- a/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +++ b/src/register/components/tests/ConfigurableRegistrationForm.test.jsx @@ -251,7 +251,7 @@ describe('ConfigurableRegistrationForm', () => { country: 'Pakistan', honor_code: true, profession: 'Engineer', - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -362,7 +362,7 @@ describe('ConfigurableRegistrationForm', () => { password: 'password1', country: 'Ukraine', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store = mockStore({ diff --git a/src/register/data/utils.js b/src/register/data/utils.js index ee08f0b6..e7773e2b 100644 --- a/src/register/data/utils.js +++ b/src/register/data/utils.js @@ -126,8 +126,8 @@ export const prepareRegistrationPayload = ( delete payload.marketingEmailsOptIn; } - payload = snakeCaseObject(payload); payload.totalRegistrationTime = totalRegistrationTime; + payload = snakeCaseObject(payload); // add query params to the payload payload = { ...payload, ...queryParams };