diff --git a/src/register/RegistrationPage.test.jsx b/src/register/RegistrationPage.test.jsx index 92c74854..18e4e513 100644 --- a/src/register/RegistrationPage.test.jsx +++ b/src/register/RegistrationPage.test.jsx @@ -183,7 +183,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, next: '/course/demo-course-url', }; @@ -206,7 +206,7 @@ describe('RegistrationPage', () => { country: 'Pakistan', honor_code: true, social_auth_provider: 'Apple', - totalRegistrationTime: 0, + total_registration_time: 0, }; store = mockStore({ @@ -239,7 +239,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Ukraine', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -264,7 +264,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Ukraine', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -290,7 +290,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, marketing_emails_opt_in: true, }; @@ -317,7 +317,7 @@ describe('RegistrationPage', () => { password: 'password1', country: 'Pakistan', honor_code: true, - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -882,7 +882,7 @@ describe('RegistrationPage', () => { email: 'john.doe@example.com', country: 'PK', social_auth_provider: 'Apple', - totalRegistrationTime: 0, + total_registration_time: 0, })); }); }); diff --git a/src/register/components/tests/ConfigurableRegistrationForm.test.jsx b/src/register/components/tests/ConfigurableRegistrationForm.test.jsx index 537d11eb..3d664260 100644 --- a/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +++ b/src/register/components/tests/ConfigurableRegistrationForm.test.jsx @@ -245,7 +245,7 @@ describe('ConfigurableRegistrationForm', () => { country: 'Pakistan', honor_code: true, profession: 'Engineer', - totalRegistrationTime: 0, + total_registration_time: 0, }; store.dispatch = jest.fn(store.dispatch); @@ -356,7 +356,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 747f2f2c..25694527 100644 --- a/src/register/data/utils.js +++ b/src/register/data/utils.js @@ -134,8 +134,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 };