From 598f6b2d8aefea766db3080ff125ce0491c32f08 Mon Sep 17 00:00:00 2001 From: Angelika Kinas Date: Wed, 12 Jul 2023 13:13:26 +0200 Subject: [PATCH 1/4] feat: Make email mailto --- .../src/lib/metadata-contact/metadata-contact.component.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html index f757f765f7..c973b9d66a 100644 --- a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +++ b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html @@ -10,7 +10,9 @@ {{ shownContact.organisation }} -

{{ shownContact.email }}

+ {{ + shownContact.email + }}
Date: Thu, 13 Jul 2023 09:51:31 +0200 Subject: [PATCH 2/4] fix(test): Change email to mailto: --- .../lib/metadata-contact/metadata-contact.component.html | 2 +- .../metadata-contact/metadata-contact.component.spec.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html index c973b9d66a..ddfffdd16b 100644 --- a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +++ b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html @@ -17,7 +17,7 @@ {{ shownContact.website }} open_in_new { }) }) describe('content', () => { - let ps + let email beforeEach(() => { - ps = fixture.debugElement.queryAll(By.css('p')) + email = fixture.debugElement.query(By.css('a')) }) it('displays the contact name', () => { const el = fixture.debugElement.query( @@ -69,10 +69,10 @@ describe('MetadataContactComponent', () => { expect(el.innerHTML).toBe(' Worldcorp ') }) it('displays the contact email', () => { - expect(ps[1].nativeElement.innerHTML).toBe('john@world.co') + expect(email.attributes.href).toBe('mailto:john@world.co') }) it('displays a link to the contact website', () => { - const a = fixture.debugElement.query(By.css('a')) + const a = fixture.debugElement.query(By.css('.contact-website')) expect(a.attributes.href).toBe('https://john.world.co') expect(a.attributes.target).toBe('_blank') }) From fc2e50f1e71416f454a66cef47426552e067cf2f Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Wed, 19 Jul 2023 15:16:55 +0200 Subject: [PATCH 3/4] fix: opening in new tab --- .../src/lib/metadata-contact/metadata-contact.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html index ddfffdd16b..eb3c07a516 100644 --- a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +++ b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html @@ -10,7 +10,7 @@ {{ shownContact.organisation }}
- {{ + {{ shownContact.email }}
From 67e8c63ee7eae550802e801f9766e5a55d6024c4 Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Thu, 20 Jul 2023 11:00:47 +0200 Subject: [PATCH 4/4] fix: format problem --- .../lib/metadata-contact/metadata-contact.component.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html index eb3c07a516..d0f2150e8b 100644 --- a/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +++ b/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html @@ -10,9 +10,12 @@ {{ shownContact.organisation }}
- {{ - shownContact.email - }} + {{ shownContact.email }}