Skip to content

Commit

Permalink
fix: change the totalRegisterationTime to snake case
Browse files Browse the repository at this point in the history
Description:
Convert the totalRegistrationTime to snake case
VAN-1816
  • Loading branch information
Ahtesham Quraish committed Aug 21, 2024
1 parent d629d66 commit 5d87376
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ exports[`SocialAuthProviders should match social auth provider with iconClass sn
data-prefix="fab"
focusable="false"
role="img"
style={{}}
style={Object {}}
viewBox="0 0 488 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"
fill="currentColor"
style={{}}
style={Object {}}
/>
</svg>
</div>
Expand All @@ -93,7 +93,7 @@ exports[`SocialAuthProviders should match social auth provider with iconClass sn
`;

exports[`SocialAuthProviders should match social auth provider with iconImage snapshot 1`] = `
[
Array [
<button
className="btn-social btn-oa2-apple-id mr-3"
data-provider-url="/auth/login/apple-id/?auth_entry=login&next=/dashboard"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`ThirdPartyAuthAlert should match login page third party auth alert mess
`;

exports[`ThirdPartyAuthAlert should match register page third party auth alert message snapshot 1`] = `
[
Array [
<div
className="fade alert-content alert-success mt-n2 mb-5 alert show"
id="tpa-alert"
Expand Down
34 changes: 17 additions & 17 deletions src/common-components/tests/__snapshots__/Zendesk.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ exports[`Zendesk Help should match login page third party auth alert message sna
cookies={true}
defer={true}
webWidget={
{
"answerBot": {
"avatar": {
"name": {
Object {
"answerBot": Object {
"avatar": Object {
"name": Object {
"*": "edX Support",
},
"url": undefined,
},
"contactOnlyAfterQuery": true,
"suppress": false,
"title": {
"title": Object {
"*": "edX Support",
},
},
"chat": {
"departments": {
"enabled": [
"chat": Object {
"departments": Object {
"enabled": Array [
"account settings",
"billing and payments",
"certificates",
Expand All @@ -33,17 +33,17 @@ exports[`Zendesk Help should match login page third party auth alert message sna
},
"suppress": false,
},
"contactForm": {
"contactForm": Object {
"attachments": true,
"selectTicketForm": {
"selectTicketForm": Object {
"*": "Please choose your request type:",
},
"ticketForms": [
{
"fields": [
{
"ticketForms": Array [
Object {
"fields": Array [
Object {
"id": "description",
"prefill": {
"prefill": Object {
"*": "",
},
},
Expand All @@ -53,10 +53,10 @@ exports[`Zendesk Help should match login page third party auth alert message sna
},
],
},
"contactOptions": {
"contactOptions": Object {
"enabled": false,
},
"helpCenter": {
"helpCenter": Object {
"originalArticleButton": true,
},
}
Expand Down
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 @@ -135,7 +135,7 @@ export const prepareRegistrationPayload = (
}

payload = snakeCaseObject(payload);
payload.totalRegistrationTime = totalRegistrationTime;
payload.total_registration_time = totalRegistrationTime;

// add query params to the payload
payload = { ...payload, ...queryParams };
Expand Down

0 comments on commit 5d87376

Please sign in to comment.