diff --git a/src/components/feature-board-link-element/components/LinkContentElement.unit.ts b/src/components/feature-board-link-element/components/LinkContentElement.unit.ts index e1dd367764..f292c3f38d 100644 --- a/src/components/feature-board-link-element/components/LinkContentElement.unit.ts +++ b/src/components/feature-board-link-element/components/LinkContentElement.unit.ts @@ -123,7 +123,7 @@ describe("LinkContentElement", () => { const component = wrapper.getComponent(LinkContentElementCreate); component.vm.$emit("create:url", "https://abc.de"); - expect(useMetaTagExtractorApiMock.extractMetaTags).toHaveBeenCalled(); + expect(useMetaTagExtractorApiMock.getMetaTags).toHaveBeenCalled(); }); describe("when no protocol was provided", () => { @@ -135,7 +135,7 @@ describe("LinkContentElement", () => { component.vm.$emit("create:url", url); const expected = `https://${url}`; - expect(useMetaTagExtractorApiMock.extractMetaTags).toHaveBeenCalledWith( + expect(useMetaTagExtractorApiMock.getMetaTags).toHaveBeenCalledWith( expected ); }); @@ -151,9 +151,12 @@ describe("LinkContentElement", () => { title: "my title", description: "", imageUrl: "https://abc.de/foto.png", + type: "unknown", + parentTitle: "", + parentType: "unknown", }; - useMetaTagExtractorApiMock.extractMetaTags.mockResolvedValue( + useMetaTagExtractorApiMock.getMetaTags.mockResolvedValue( fakeMetaTags ); diff --git a/src/components/feature-board-link-element/components/LinkContentElement.vue b/src/components/feature-board-link-element/components/LinkContentElement.vue index 2ed6b0a28d..5d13536d07 100644 --- a/src/components/feature-board-link-element/components/LinkContentElement.vue +++ b/src/components/feature-board-link-element/components/LinkContentElement.vue @@ -90,7 +90,7 @@ export default defineComponent({ () => props.isEditMode && !computedElement.value.content.url ); - const { extractMetaTags } = useMetaTagExtractorApi(); + const { getMetaTags } = useMetaTagExtractorApi(); const { createPreviewImage } = usePreviewGenerator(element.value.id); @@ -101,8 +101,7 @@ export default defineComponent({ const validUrl = ensureProtocolIncluded(originalUrl); modelValue.value.url = validUrl; - const { title, description, imageUrl } = - await extractMetaTags(validUrl); + const { title, description, imageUrl } = await getMetaTags(validUrl); modelValue.value.title = title; modelValue.value.description = description; diff --git a/src/components/feature-board-link-element/components/LinkContentElementCreate.vue b/src/components/feature-board-link-element/components/LinkContentElementCreate.vue index b647dc1904..b1fc3b1c73 100644 --- a/src/components/feature-board-link-element/components/LinkContentElementCreate.vue +++ b/src/components/feature-board-link-element/components/LinkContentElementCreate.vue @@ -12,14 +12,14 @@ rows="1" @keydown.enter.prevent.stop="onKeydownEnter" class="text" - > - - - - + /> + +