-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change mapper common profile, test, and links
- Loading branch information
Showing
4 changed files
with
58 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { ManfredAwesomicCV } from '@/model'; | ||
import { ContactMean, ManfredAwesomicCV } from '@/model'; | ||
import { mapFromMacCvToProfileSectionVm, mapRelevantLinksToVm } from './profile-section.mapper'; | ||
import { ProfileSectionVm, RelevantLinkVm } from './profile-section.vm'; | ||
import { PhoneNumbers, ProfileSectionVm, RelevantLinkVm } from './profile-section.vm'; | ||
describe('Testing profile-section.mapper.ts', () => { | ||
describe('relevanLinksToVm specs', () => { | ||
it('should return relevant link type with "otros" when passed relevantLinks type is "other"', () => { | ||
|
@@ -81,6 +81,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -103,6 +104,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -137,6 +139,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -171,6 +174,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -214,6 +218,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -258,6 +263,7 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: '', | ||
fullname: ' ', | ||
emails: [] as string[], | ||
phoneNumbers: [] as PhoneNumbers[], | ||
relevantLinks: [] as RelevantLinkVm[], | ||
avatarUrl: '', | ||
city: '', | ||
|
@@ -272,8 +278,9 @@ describe('Testing profile-section.mapper.ts', () => { | |
|
||
it('It should returns cv with proper data when fields from aboutMe field have valid values', () => { | ||
// Arrange | ||
const theContact: any = { | ||
const theContact: ContactMean = { | ||
contactMails: ['[email protected]', '[email protected]'], | ||
phoneNumbers: [{ number: '659120720', countryCode: '+34' }], | ||
}; | ||
|
||
const theLink: any = { | ||
|
@@ -289,7 +296,6 @@ describe('Testing profile-section.mapper.ts', () => { | |
description: 'Frontend developer', | ||
birthday: '30/03/1990', | ||
avatar: { link: 'http://manfredexport.com' }, | ||
contact: theContact, | ||
location: { municipality: 'Madrid', country: 'Spain' }, | ||
}; | ||
|
||
|
@@ -303,6 +309,9 @@ describe('Testing profile-section.mapper.ts', () => { | |
profile: person, | ||
relevantLinks: [theLink], | ||
}, | ||
careerPreferences: { | ||
contact: theContact, | ||
}, | ||
}; | ||
|
||
const expectedResult: ProfileSectionVm = { | ||
|
@@ -311,7 +320,8 @@ describe('Testing profile-section.mapper.ts', () => { | |
title: 'Computer Science Bachelor', | ||
description: 'Frontend developer', | ||
fullname: 'John Doe', | ||
emails: ['[email protected]', '[email protected]'] as string[], | ||
emails: theContact.contactMails as string[], | ||
phoneNumbers: theContact.phoneNumbers as PhoneNumbers[], | ||
relevantLinks: [theLink] as RelevantLinkVm[], | ||
avatarUrl: 'http://manfredexport.com', | ||
city: 'Madrid', | ||
|
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