-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into ocrvs-993
- Loading branch information
Showing
29 changed files
with
73 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1446,10 +1446,8 @@ export const mockCompleteFormData = { | |
accountDetails: '', | ||
assignedRegistrationOffice: '', | ||
device: '', | ||
familyName: 'হোসেন', | ||
familyNameEng: 'Hossain', | ||
firstNames: 'Jeff', | ||
firstNamesEng: 'Jeff', | ||
familyName: 'Hossain', | ||
firstName: 'Jeff', | ||
nid: '123456789', | ||
phoneNumber: '01662132132', | ||
email: '[email protected]', | ||
|
@@ -1600,7 +1598,7 @@ export const mockUserGraphqlOperation = { | |
} | ||
}, | ||
{ | ||
name: 'firstNamesEng', | ||
name: 'firstNames', | ||
type: 'TEXT', | ||
label: { | ||
defaultMessage: 'English first name', | ||
|
@@ -1622,12 +1620,12 @@ export const mockUserGraphqlOperation = { | |
} | ||
}, | ||
{ | ||
name: 'familyNameEng', | ||
name: 'familyName', | ||
type: 'TEXT', | ||
label: { | ||
defaultMessage: 'English last name', | ||
description: 'English last name', | ||
id: 'form.field.label.lastNameEN' | ||
id: 'form.field.label.userSurname' | ||
}, | ||
required: true, | ||
initialValue: '', | ||
|
@@ -1665,33 +1663,6 @@ export const mockUserGraphqlOperation = { | |
} | ||
} | ||
}, | ||
{ | ||
name: 'nid', | ||
type: 'TEXT', | ||
label: { | ||
defaultMessage: 'NID', | ||
description: 'National ID', | ||
id: 'form.field.label.NID' | ||
}, | ||
required: true, | ||
initialValue: '', | ||
validator: [ | ||
{ | ||
operation: 'validIDNumber', | ||
parameters: ['NATIONAL_ID'] | ||
} | ||
], | ||
mapping: { | ||
mutation: { | ||
operation: 'fieldToIdentifierWithTypeTransformer', | ||
parameters: ['NATIONAL_ID'] | ||
}, | ||
query: { | ||
operation: 'identifierWithTypeToFieldTransformer', | ||
parameters: ['NATIONAL_ID'] | ||
} | ||
} | ||
}, | ||
{ | ||
name: 'accountDetails', | ||
type: 'FIELD_GROUP_TITLE', | ||
|
@@ -1822,10 +1793,8 @@ export const mockDataWithRegistarRoleSelected = { | |
accountDetails: '', | ||
assignedRegistrationOffice: '', | ||
device: '', | ||
familyName: 'হোসেন', | ||
familyNameEng: 'Hossain', | ||
firstNames: 'Jeff', | ||
firstNamesEng: 'Jeff', | ||
familyName: 'Hossain', | ||
firstName: 'Jeff', | ||
email: '[email protected]', | ||
nid: '101488192', | ||
phoneNumber: '01662132132', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,7 +230,7 @@ describe('create new user tests', () => { | |
expect( | ||
testComponent | ||
.find(FormFieldGenerator) | ||
.find('#familyNameEng_error') | ||
.find('#familyName_error') | ||
.hostNodes() | ||
.text() | ||
).toBe('Required to register a new user') | ||
|
@@ -288,13 +288,13 @@ describe('create new user tests', () => { | |
|
||
it('clicking change button on a field takes user back to form', async () => { | ||
testComponent | ||
.find('#btn_change_firstNamesEng') | ||
.find('#btn_change_firstName') | ||
.hostNodes() | ||
.first() | ||
.simulate('click') | ||
await flushPromises() | ||
expect(history.location.pathname).toBe('/createUser/user/user-view-group') | ||
expect(history.location.hash).toBe('#firstNamesEng') | ||
expect(history.location.hash).toBe('#firstName') | ||
}) | ||
|
||
it('clicking submit button submits the form data', async () => { | ||
|
@@ -339,11 +339,6 @@ describe('edit user tests', () => { | |
username: 'shakib1', | ||
mobile: '+8801662132163', | ||
email: '[email protected]', | ||
identifier: { | ||
system: 'NATIONAL_ID', | ||
value: '101488192', | ||
__typename: 'Identifier' | ||
}, | ||
systemRole: 'NATIONAL_REGISTRAR', | ||
role: { _id: '63ef9466f708ea080777c27a' }, | ||
status: 'active', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ const MOCK_USER: IUserModelData = { | |
} | ||
], | ||
username: 'd.bulaya', | ||
identifiers: [], | ||
email: '', | ||
device: 'Samsung Galaxy S9', | ||
emailForNotification: '[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ describe('User type resolvers', () => { | |
username: 'tamim.iqlbal', | ||
mobile: '+8801711111111', | ||
email: '[email protected]', | ||
identifiers: [{ system: 'NATIONAL_ID', value: '1010101010' }], | ||
systemRole: 'REGISTRATION_AGENT', | ||
scope: ['certify'], | ||
status: 'active', | ||
|
@@ -90,13 +89,6 @@ describe('User type resolvers', () => { | |
const res = userTypeResolvers.User!.underInvestigation(mockResponse) | ||
expect(res).toBeTruthy() | ||
}) | ||
it('return user identifier', () => { | ||
const res = userTypeResolvers.User!.identifier(mockResponse) | ||
expect(res).toEqual({ | ||
system: mockResponse.identifiers[0].system, | ||
value: mockResponse.identifiers[0].value | ||
}) | ||
}) | ||
it('return primaryOffice type', async () => { | ||
const mockOffice = { | ||
resourceType: 'Location', | ||
|
Oops, something went wrong.