mattwr18 00d5f58b00 Move components to features, style table[WIP]
- In conversations with @alina-beck, she suggested we move the
ReportsTable and FiledTable to features since it is tightly coupled to
Reports... we can work towards a table that is "dumb" and just takes the
data and displays it in another PR
- Add extra column for Current status
- Fix widths
2019-12-02 11:26:11 +01:00

37 lines
832 B
JavaScript

import { config, mount } from '@vue/test-utils'
import ReportsTable from './ReportsTable.vue'
import Styleguide from '@human-connection/styleguide'
const localVue = global.localVue
localVue.use(Styleguide)
config.stubs['client-only'] = '<span><slot /></span>'
describe('ReportsTable', () => {
let propsData
let mocks
beforeEach(() => {
propsData = {}
mocks = {
$t: jest.fn(t => t),
}
})
describe('mount', () => {
const Wrapper = () => {
return mount(ReportsTable, { propsData, mocks, localVue })
}
describe('no reports', () => {
beforeEach(() => {
propsData = { ...propsData, reports: [] }
})
it('shows a placeholder', () => {
const wrapper = Wrapper()
expect(wrapper.text()).toContain('moderation.reports.empty')
})
})
})
})