mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
lint: clean
This commit is contained in:
parent
cccb6cec83
commit
404b926a1f
@ -6,15 +6,12 @@ import helpers from '~/storybook/helpers'
|
|||||||
|
|
||||||
helpers.init()
|
helpers.init()
|
||||||
|
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
localVue.directive('scrollTo', jest.fn())
|
localVue.directive('scrollTo', jest.fn())
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe('SearchResults', () => {
|
describe('SearchResults', () => {
|
||||||
let mocks, getters, propsData, wrapper
|
let mocks, getters, propsData, wrapper
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
@ -50,48 +47,30 @@ describe('SearchResults', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
describe('contains users less as 25 results', () => {
|
describe('contains users less as 25 results', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper.setData( { users: helpers.fakeUser(1), userCount:1, activeTab: 'User' })
|
wrapper.setData({ users: helpers.fakeUser(1), userCount: 1, activeTab: 'User' })
|
||||||
})
|
|
||||||
|
|
||||||
it('renders pagination', () => {
|
|
||||||
expect(wrapper.find('.pagination-buttons').exists()).toBe(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('show NOT pagination', () => {
|
it('show NOT pagination', () => {
|
||||||
|
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('display: none;')
|
||||||
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('display: none;')
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('contains users more as 25 results', () => {
|
describe('contains users more as 25 results', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper.setData( { users: helpers.fakeUser(52), userCount:52, activeTab: 'User' })
|
wrapper.setData({ users: helpers.fakeUser(52), userCount: 52, activeTab: 'User' })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('renders user-list pagination', () => {
|
it('show pagination', () => {
|
||||||
expect(wrapper.find('.user-list').exists()).toBe(true)
|
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('renders pagination', () => {
|
|
||||||
expect(wrapper.find('.pagination-buttons').exists()).toBe(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('show pagination', () => {
|
|
||||||
|
|
||||||
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('')
|
|
||||||
|
|
||||||
|
it('renders user-list pagination', () => {
|
||||||
|
expect(wrapper.find('.user-list').exists()).toBe(true)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
describe('contains posts', () => {
|
describe('contains posts', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@ -117,7 +96,6 @@ describe('SearchResults', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -199,7 +199,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchCount() {
|
searchCount() {
|
||||||
return this.postCount + this.userCount + this.hashtagCount
|
return this.postCount + this.userCount + this.hashtagCount
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clearPage() {
|
clearPage() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user