mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
- 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
37 lines
832 B
JavaScript
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')
|
|
})
|
|
})
|
|
})
|
|
})
|