Skip to content

Commit

Permalink
fix: change the totalRegisterationTime to snake case (#1301)
Browse files Browse the repository at this point in the history
Description:
Convert the totalRegistrationTime to snake case
VAN-1816

Co-authored-by: Ahtesham Quraish <ahtesham.quraish@192.168.1.4>
  • Loading branch information
ahtesham-quraish and Ahtesham Quraish authored Aug 28, 2024
1 parent 9688bd3 commit 4a65f0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/register/RegistrationPage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('RegistrationPage', () => {
password: 'password1',
country: 'Pakistan',
honor_code: true,
totalRegistrationTime: 0,
total_registration_time: 0,
next: '/course/demo-course-url',
};

Expand All @@ -206,7 +206,7 @@ describe('RegistrationPage', () => {
country: 'Pakistan',
honor_code: true,
social_auth_provider: 'Apple',
totalRegistrationTime: 0,
total_registration_time: 0,
};

store = mockStore({
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -290,7 +290,7 @@ describe('RegistrationPage', () => {
password: 'password1',
country: 'Pakistan',
honor_code: true,
totalRegistrationTime: 0,
total_registration_time: 0,
marketing_emails_opt_in: true,
};

Expand All @@ -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);
Expand Down Expand Up @@ -882,7 +882,7 @@ describe('RegistrationPage', () => {
email: 'john.doe@example.com',
country: 'PK',
social_auth_provider: 'Apple',
totalRegistrationTime: 0,
total_registration_time: 0,
}));
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('ConfigurableRegistrationForm', () => {
password: 'password1',
country: 'Ukraine',
honor_code: true,
totalRegistrationTime: 0,
total_registration_time: 0,
};

store = mockStore({
Expand Down
2 changes: 1 addition & 1 deletion src/register/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 4a65f0a

Please sign in to comment.