Skip to content

Commit

Permalink
Merge pull request #258 from openedx/azan/rename-word-activation
Browse files Browse the repository at this point in the history
fix(userSummary): update activation field name
  • Loading branch information
azanbinzahid authored Jun 23, 2022
2 parents 756eab1 + 60ec435 commit cb255a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/users/UserSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function UserSummary({
</tr>

<tr>
<th>{!userData.isActive ? 'Activation Key/Link' : 'Active'}</th>
<th>{!userData.isActive ? 'Confirmation Link' : 'Confirmed'}</th>
<td>
{
// eslint-disable-next-line no-nested-ternary
Expand Down
10 changes: 5 additions & 5 deletions src/users/UserSummary.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('User Summary Component Tests', () => {
value: '[email protected]',
},
{
header: 'Active',
header: 'Confirmed',
value: 'yes',
},
{
Expand Down Expand Up @@ -126,31 +126,31 @@ describe('User Summary Component Tests', () => {

it('Active User Data', () => {
const { rowName, rowValue } = getActivationKeyRow(UserSummaryData);
expect(rowName.text()).not.toEqual('Activation Key/Link');
expect(rowName.text()).not.toEqual('Confirmation Link');
expect(rowValue.text()).not.toEqual(UserSummaryData.userData.activationKey);
});

it('Inactive User Data ', () => {
const InActiveUserData = { ...UserSummaryData.userData, isActive: false };
const InActiveUserSummaryData = { ...UserSummaryData, userData: InActiveUserData };
const { rowName, rowValue } = getActivationKeyRow(InActiveUserSummaryData);
expect(rowName.text()).toEqual('Activation Key/Link');
expect(rowName.text()).toEqual('Confirmation Link');
expect(rowValue.text()).toEqual(UserSummaryData.userData.activationKey);
});

it('Active User With No Registration Data ', () => {
const InActiveUserData = { ...UserSummaryData.userData, activationKey: null };
const InActiveUserSummaryData = { ...UserSummaryData, userData: InActiveUserData };
const { rowName, rowValue } = getActivationKeyRow(InActiveUserSummaryData);
expect(rowName.text()).not.toEqual('Activation Key/Link');
expect(rowName.text()).not.toEqual('Confirmation Link');
expect(rowValue.text()).not.toEqual(UserSummaryData.userData.activationKey);
});

it('Inactive User With No Registration Data ', () => {
const InActiveUserData = { ...UserSummaryData.userData, activationKey: null, isActive: false };
const InActiveUserSummaryData = { ...UserSummaryData, userData: InActiveUserData };
const { rowName, rowValue } = getActivationKeyRow(InActiveUserSummaryData);
expect(rowName.text()).toEqual('Activation Key/Link');
expect(rowName.text()).toEqual('Confirmation Link');
expect(rowValue.text()).toEqual('N/A');
});
});
Expand Down

0 comments on commit cb255a2

Please sign in to comment.