diff --git a/webapp/components/NotificationsTable/NotificationsTable.spec.js b/webapp/components/NotificationsTable/NotificationsTable.spec.js index e48610034..0d3560787 100644 --- a/webapp/components/NotificationsTable/NotificationsTable.spec.js +++ b/webapp/components/NotificationsTable/NotificationsTable.spec.js @@ -59,8 +59,8 @@ describe('NotificationsTable.vue', () => { wrapper = Wrapper() }) - it('renders a table', () => { - expect(wrapper.find('.ds-table').exists()).toBe(true) + it('renders a grid table', () => { + expect(wrapper.find('.notification-grid').exists()).toBe(true) }) describe('renders 4 columns', () => { @@ -84,7 +84,7 @@ describe('NotificationsTable.vue', () => { describe('Post', () => { let firstRowNotification beforeEach(() => { - firstRowNotification = wrapper.findAll('tbody tr').at(0) + firstRowNotification = wrapper.findAll('.notification-grid-row').at(0) }) it('renders the author', () => { @@ -117,7 +117,7 @@ describe('NotificationsTable.vue', () => { describe('Comment', () => { let secondRowNotification beforeEach(() => { - secondRowNotification = wrapper.findAll('tbody tr').at(1) + secondRowNotification = wrapper.findAll('.notification-grid-row').at(1) }) it('renders the author', () => { diff --git a/webapp/components/NotificationsTable/NotificationsTable.vue b/webapp/components/NotificationsTable/NotificationsTable.vue index 07db4f9a2..7065b2624 100644 --- a/webapp/components/NotificationsTable/NotificationsTable.vue +++ b/webapp/components/NotificationsTable/NotificationsTable.vue @@ -1,62 +1,108 @@ - - - - - - - - - - - - - {{ $t(`notifications.reason.${scope.row.reason}`) }} - - - - + + + + + {{ field.label }} + + + + - {{ scope.row.from.title || scope.row.from.post.title | truncate(50) }} - - - - - {{ scope.row.from.contentExcerpt | removeHtml }} - - - + + + + + + + + + + + + + + + + + + + + + {{ $t(`notifications.reason.${notification.reason}`) }} + + + + + + + + + + + + + {{ notification.from.title || notification.from.post.title | truncate(50) }} + + + + + + + + {{ notification.from.contentExcerpt | removeHtml }} + + + + + + + + +