-
- {{ $t('form.close') }}
+
+
+
+
+
+
+
+ {{ $t('form.close') }}
+
@@ -55,4 +63,7 @@ export default {
.temp-message {
margin-top: 50px;
}
+.clearboth {
+ clear: both;
+}
diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.spec.js b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.spec.js
index 7504854d0..2dc9fb3ce 100644
--- a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.spec.js
+++ b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.spec.js
@@ -175,4 +175,68 @@ describe('ContributionMessagesListItem', () => {
})
})
})
+
+ describe('links in contribtion message', () => {
+ const propsData = {
+ message: {
+ id: 111,
+ message: 'Lorem ipsum?',
+ createdAt: '2022-08-29T12:23:27.000Z',
+ updatedAt: null,
+ type: 'DIALOG',
+ userFirstName: 'Peter',
+ userLastName: 'Lustig',
+ userId: 107,
+ __typename: 'ContributionMessage',
+ },
+ }
+
+ const ModeratorItemWrapper = () => {
+ return mount(ContributionMessagesListItem, {
+ localVue,
+ mocks,
+ propsData,
+ })
+ }
+
+ let messageField
+
+ describe('message of only one link', () => {
+ beforeEach(() => {
+ propsData.message.message = 'https://gradido.net/de/'
+ wrapper = ModeratorItemWrapper()
+ messageField = wrapper.find('div.is-not-moderator.text-right > div:nth-child(4)')
+ })
+
+ it('contains the link as text', () => {
+ expect(messageField.text()).toBe('https://gradido.net/de/')
+ })
+
+ it('contains a link to the given address', () => {
+ expect(messageField.find('a').attributes('href')).toBe('https://gradido.net/de/')
+ })
+ })
+
+ describe('message with text and two links', () => {
+ beforeEach(() => {
+ propsData.message.message = `Here you find all you need to know about Gradido: https://gradido.net/de/
+and here is the link to the repository: https://github.com/gradido/gradido`
+ wrapper = ModeratorItemWrapper()
+ messageField = wrapper.find('div.is-not-moderator.text-right > div:nth-child(4)')
+ })
+
+ it('contains the whole text', () => {
+ expect(messageField.text())
+ .toBe(`Here you find all you need to know about Gradido: https://gradido.net/de/
+and here is the link to the repository: https://github.com/gradido/gradido`)
+ })
+
+ it('contains the two links', () => {
+ expect(messageField.findAll('a').at(0).attributes('href')).toBe('https://gradido.net/de/')
+ expect(messageField.findAll('a').at(1).attributes('href')).toBe(
+ 'https://github.com/gradido/gradido',
+ )
+ })
+ })
+ })
})
diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue
index 6c2e555f2..9c7a3a0f2 100644
--- a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue
+++ b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue
@@ -1,24 +1,29 @@