mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-15 01:14:39 +00:00
Add example notification for filed report to storybook
This commit is contained in:
parent
e563887022
commit
0bb2b905ee
@ -3,7 +3,7 @@ import NotificationList from './NotificationList'
|
||||
import Notification from '../Notification/Notification'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import { notifications } from '~/components/utils/Notifications'
|
||||
import { testNotifications } from '~/components/utils/Notifications'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
@ -34,7 +34,7 @@ describe('NotificationList.vue', () => {
|
||||
stubs = {
|
||||
NuxtLink: RouterLinkStub,
|
||||
}
|
||||
propsData = { notifications }
|
||||
propsData = { notifications: testNotifications }
|
||||
})
|
||||
|
||||
describe('shallowMount', () => {
|
||||
|
||||
@ -3,7 +3,7 @@ import { config, mount, RouterLinkStub } from '@vue/test-utils'
|
||||
import Vuex from 'vuex'
|
||||
import NotificationsTable from './NotificationsTable'
|
||||
|
||||
import { notifications } from '~/components/utils/Notifications'
|
||||
import { testNotifications } from '~/components/utils/Notifications'
|
||||
const localVue = global.localVue
|
||||
|
||||
localVue.filter('truncate', string => string)
|
||||
@ -12,6 +12,7 @@ config.stubs['client-only'] = '<span><slot /></span>'
|
||||
|
||||
describe('NotificationsTable.vue', () => {
|
||||
let wrapper, mocks, propsData, stubs
|
||||
const notifications = testNotifications
|
||||
const postNotification = notifications[0]
|
||||
const commentNotification = notifications[1]
|
||||
const reportNotification = notifications[2]
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { storiesOf } from '@storybook/vue'
|
||||
import { withA11y } from '@storybook/addon-a11y'
|
||||
import { action } from '@storybook/addon-actions'
|
||||
import { testNotifications } from '~/components/utils/Notifications'
|
||||
import NotificationsTable from '~/components/NotificationsTable/NotificationsTable'
|
||||
import helpers from '~/storybook/helpers'
|
||||
import { post } from '~/components/PostCard/PostCard.story.js'
|
||||
@ -61,6 +62,7 @@ export const notifications = [
|
||||
__typename: 'NOTIFIED',
|
||||
index: 2,
|
||||
},
|
||||
...testNotifications,
|
||||
]
|
||||
storiesOf('NotificationsTable', module)
|
||||
.addDecorator(withA11y)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export const notifications = [
|
||||
export const testNotifications = [
|
||||
{
|
||||
read: false,
|
||||
reason: 'mentioned_in_post',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user