|
@@ -4,6 +4,7 @@ import { renderComponent } from '#tests/support/components/index.ts'
|
|
|
|
|
|
import { createDummyArticle } from '#shared/entities/ticket-article/__tests__/mocks/ticket-articles.ts'
|
|
|
import { createDummyTicket } from '#shared/entities/ticket-article/__tests__/mocks/ticket.ts'
|
|
|
+import { convertToGraphQLId } from '#shared/graphql/utils.ts'
|
|
|
|
|
|
import { provideTicketInformationMocks } from '#desktop/entities/ticket/__tests__/mocks/provideTicketInformationMocks.ts'
|
|
|
import ArticleBubbleBody from '#desktop/pages/ticket/components/TicketDetailView/ArticleBubble/ArticleBubbleBody.vue'
|
|
@@ -62,4 +63,34 @@ describe('ArticleBubbleBody', () => {
|
|
|
await wrapper.queryByText(article.author.fullname!),
|
|
|
).to.toBeInTheDocument()
|
|
|
})
|
|
|
+
|
|
|
+ it('does not display system message name on article body', async () => {
|
|
|
+ const article = createDummyArticle({
|
|
|
+ bodyWithUrls: 'test & body',
|
|
|
+ contentType: 'text/plain',
|
|
|
+ internal: true,
|
|
|
+ author: {
|
|
|
+ id: convertToGraphQLId('User', 1), // System message user id
|
|
|
+ fullname: '-',
|
|
|
+ firstname: '-',
|
|
|
+ lastname: '',
|
|
|
+ email: '',
|
|
|
+ active: false,
|
|
|
+ image: null,
|
|
|
+ vip: false,
|
|
|
+ outOfOffice: false,
|
|
|
+ outOfOfficeStartAt: null,
|
|
|
+ outOfOfficeEndAt: null,
|
|
|
+ authorizations: [],
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ const wrapper = renderBody(article, false)
|
|
|
+
|
|
|
+ expect(
|
|
|
+ wrapper.queryByRole('group', {
|
|
|
+ description: 'Author name and article creation date',
|
|
|
+ }),
|
|
|
+ ).not.toBeInTheDocument()
|
|
|
+ })
|
|
|
})
|