From cc4f2b52648870daec809e79cdd40cf407b09df8 Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Fri, 8 Dec 2023 11:08:25 +0100 Subject: [PATCH 1/6] modified unit test profile-section-mapper.spec.ts --- .../profile-section.mapper.spec.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts index 45229254..1b1f670a 100644 --- a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts +++ b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts @@ -82,6 +82,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -101,6 +104,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -132,6 +138,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -163,6 +172,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -203,6 +215,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -244,6 +259,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], + avatar: ' ', + regionLocation: ' ', + countryLocation: ' ', }; // Act @@ -295,6 +313,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: 'John Doe', emails: ['john.doe@mydomain.com', 'john.doe@anydomain.com'] as string[], relevantLinks: [theLink] as RelevantLinkVm[], + avatar: 'undefined', + regionLocation: 'undefined', + countryLocation: 'undefined', }; // Act From 0f5caa6ea8119de98922e9fce2af4d3943e0906e Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Fri, 8 Dec 2023 11:37:19 +0100 Subject: [PATCH 2/6] change profile section mapper spect --- .../profile-section.mapper.spec.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts index 1b1f670a..4818444b 100644 --- a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts +++ b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts @@ -82,9 +82,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -104,9 +104,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -138,9 +138,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -172,9 +172,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -215,9 +215,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -259,9 +259,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: ' ', emails: [] as string[], relevantLinks: [] as RelevantLinkVm[], - avatar: ' ', - regionLocation: ' ', - countryLocation: ' ', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act From ac468a92f242119ca223947dde14071bc1034cd8 Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Fri, 8 Dec 2023 11:45:23 +0100 Subject: [PATCH 3/6] changed test returns cv with proper data when fields from aboutMe --- .../doc-parts/profile-section/profile-section.mapper.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts index 4818444b..84714297 100644 --- a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts +++ b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts @@ -314,8 +314,8 @@ describe('Testing profile-section.mapper.ts', () => { emails: ['john.doe@mydomain.com', 'john.doe@anydomain.com'] as string[], relevantLinks: [theLink] as RelevantLinkVm[], avatar: 'undefined', - regionLocation: 'undefined', - countryLocation: 'undefined', + regionLocation: 'location unknown', + countryLocation: 'country unknown', }; // Act From a85e316a01237c6268e54835771612ed7332e3f6 Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Mon, 11 Dec 2023 14:09:53 +0100 Subject: [PATCH 4/6] changed mapper.spec.ts --- .../profile-section.mapper.spec.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts index 84714297..f5fd66fc 100644 --- a/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts +++ b/packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts @@ -288,9 +288,14 @@ describe('Testing profile-section.mapper.ts', () => { title: 'Computer Science Bachelor', description: 'Frontend developer', birthday: '30/03/1990', - avatar: undefined, + avatar: { + link: '', + }, contact: theContact, - location: undefined, + location: { + country: '', + region: '', + }, }; const cv: ManfredAwesomicCV = { @@ -313,9 +318,9 @@ describe('Testing profile-section.mapper.ts', () => { fullname: 'John Doe', emails: ['john.doe@mydomain.com', 'john.doe@anydomain.com'] as string[], relevantLinks: [theLink] as RelevantLinkVm[], - avatar: 'undefined', - regionLocation: 'location unknown', - countryLocation: 'country unknown', + avatar: '', + regionLocation: '', + countryLocation: '', }; // Act @@ -325,4 +330,5 @@ describe('Testing profile-section.mapper.ts', () => { }); }); }); + export {}; From 2a6e0412e14bb155f803b38931aff101993ed554 Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Thu, 14 Dec 2023 13:40:31 +0100 Subject: [PATCH 5/6] changed avatar.link, location and relevant links --- .../header-section/header-section.ejs | 84 +------------------ 1 file changed, 2 insertions(+), 82 deletions(-) diff --git a/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs b/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs index 35a0caaf..a19f8271 100644 --- a/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs +++ b/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs @@ -1,5 +1,5 @@ <%_ if (profile && profile !== 'undefined') { -%> - <%_ if (profile.avatar && profile.avatar.link) { -%> + <%_ if (profile.avatar && profile.avatar) { -%> photo cv <%_ } -%>
@@ -11,7 +11,7 @@

<%= profile?.surnames %>

<%= profile?.title %>

- <%_ if (profile.regionLocation && profile.countryLocation && profile.regionLocation !== 'undefined' && profile.countryLocation !== 'undefined') { -%> + <%_ if (profile.regionLocation && profile.countryLocation) { -%>
@@ -29,86 +29,6 @@

<%= profile?.regionLocation %>, <%= profile?.countryLocation %>

<%_ } -%> - <%_ if (profile.relevantLinks && profile.relevantLinks.length !== 0) { -%> -
<%_ } -%> From ad4322914f87f58d086464471d3bf318a1f5ace3 Mon Sep 17 00:00:00 2001 From: MTeresaMB Date: Thu, 14 Dec 2023 13:56:16 +0100 Subject: [PATCH 6/6] changed files --- .../html-parts/header-section/header-section.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs b/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs index a19f8271..9bfff9f8 100644 --- a/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs +++ b/packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/header-section/header-section.ejs @@ -1,5 +1,5 @@ <%_ if (profile && profile !== 'undefined') { -%> - <%_ if (profile.avatar && profile.avatar) { -%> + <%_ if (profile.avatar) { -%> photo cv <%_ } -%>
@@ -11,7 +11,7 @@

<%= profile?.surnames %>

<%= profile?.title %>

- <%_ if (profile.regionLocation && profile.countryLocation) { -%> + <%_ if (profile.regionLocation) { -%>