Skip to content

Commit 4a65f0a

Browse files
ahtesham-quraishAhtesham Quraish
andauthored
fix: change the totalRegisterationTime to snake case (#1301)
Description: Convert the totalRegistrationTime to snake case VAN-1816 Co-authored-by: Ahtesham Quraish <ahtesham.quraish@192.168.1.4>
1 parent 9688bd3 commit 4a65f0a

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/register/RegistrationPage.test.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('RegistrationPage', () => {
183183
password: 'password1',
184184
country: 'Pakistan',
185185
honor_code: true,
186-
totalRegistrationTime: 0,
186+
total_registration_time: 0,
187187
next: '/course/demo-course-url',
188188
};
189189

@@ -206,7 +206,7 @@ describe('RegistrationPage', () => {
206206
country: 'Pakistan',
207207
honor_code: true,
208208
social_auth_provider: 'Apple',
209-
totalRegistrationTime: 0,
209+
total_registration_time: 0,
210210
};
211211

212212
store = mockStore({
@@ -239,7 +239,7 @@ describe('RegistrationPage', () => {
239239
password: 'password1',
240240
country: 'Ukraine',
241241
honor_code: true,
242-
totalRegistrationTime: 0,
242+
total_registration_time: 0,
243243
};
244244

245245
store.dispatch = jest.fn(store.dispatch);
@@ -264,7 +264,7 @@ describe('RegistrationPage', () => {
264264
password: 'password1',
265265
country: 'Ukraine',
266266
honor_code: true,
267-
totalRegistrationTime: 0,
267+
total_registration_time: 0,
268268
};
269269

270270
store.dispatch = jest.fn(store.dispatch);
@@ -290,7 +290,7 @@ describe('RegistrationPage', () => {
290290
password: 'password1',
291291
country: 'Pakistan',
292292
honor_code: true,
293-
totalRegistrationTime: 0,
293+
total_registration_time: 0,
294294
marketing_emails_opt_in: true,
295295
};
296296

@@ -317,7 +317,7 @@ describe('RegistrationPage', () => {
317317
password: 'password1',
318318
country: 'Pakistan',
319319
honor_code: true,
320-
totalRegistrationTime: 0,
320+
total_registration_time: 0,
321321
};
322322

323323
store.dispatch = jest.fn(store.dispatch);
@@ -882,7 +882,7 @@ describe('RegistrationPage', () => {
882882
email: 'john.doe@example.com',
883883
country: 'PK',
884884
social_auth_provider: 'Apple',
885-
totalRegistrationTime: 0,
885+
total_registration_time: 0,
886886
}));
887887
});
888888
});

src/register/components/tests/ConfigurableRegistrationForm.test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe('ConfigurableRegistrationForm', () => {
245245
country: 'Pakistan',
246246
honor_code: true,
247247
profession: 'Engineer',
248-
totalRegistrationTime: 0,
248+
total_registration_time: 0,
249249
};
250250

251251
store.dispatch = jest.fn(store.dispatch);
@@ -356,7 +356,7 @@ describe('ConfigurableRegistrationForm', () => {
356356
password: 'password1',
357357
country: 'Ukraine',
358358
honor_code: true,
359-
totalRegistrationTime: 0,
359+
total_registration_time: 0,
360360
};
361361

362362
store = mockStore({

src/register/data/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ export const prepareRegistrationPayload = (
134134
delete payload.marketingEmailsOptIn;
135135
}
136136

137-
payload = snakeCaseObject(payload);
138137
payload.totalRegistrationTime = totalRegistrationTime;
138+
payload = snakeCaseObject(payload);
139139

140140
// add query params to the payload
141141
payload = { ...payload, ...queryParams };

0 commit comments

Comments
 (0)