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()
|
||||
|
||||
|
||||
const localVue = global.localVue
|
||||
localVue.directive('scrollTo', jest.fn())
|
||||
|
||||
config.stubs['client-only'] = '<span><slot /></span>'
|
||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||
|
||||
|
||||
|
||||
describe('SearchResults', () => {
|
||||
let mocks, getters, propsData, wrapper
|
||||
const Wrapper = () => {
|
||||
@ -50,48 +47,30 @@ describe('SearchResults', () => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
describe('contains users less as 25 results', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.setData( { users: helpers.fakeUser(1), userCount:1, activeTab: 'User' })
|
||||
})
|
||||
|
||||
it('renders pagination', () => {
|
||||
expect(wrapper.find('.pagination-buttons').exists()).toBe(true)
|
||||
wrapper.setData({ users: helpers.fakeUser(1), userCount: 1, activeTab: 'User' })
|
||||
})
|
||||
|
||||
it('show NOT pagination', () => {
|
||||
|
||||
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('display: none;')
|
||||
|
||||
})
|
||||
|
||||
describe('contains users more as 25 results', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.setData( { users: helpers.fakeUser(52), userCount:52, activeTab: 'User' })
|
||||
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('display: none;')
|
||||
})
|
||||
|
||||
it('renders user-list pagination', () => {
|
||||
expect(wrapper.find('.user-list').exists()).toBe(true)
|
||||
})
|
||||
describe('contains users more as 25 results', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.setData({ users: helpers.fakeUser(52), userCount: 52, activeTab: 'User' })
|
||||
})
|
||||
|
||||
it('renders pagination', () => {
|
||||
expect(wrapper.find('.pagination-buttons').exists()).toBe(true)
|
||||
})
|
||||
it('show pagination', () => {
|
||||
expect(wrapper.find('.pagination-buttons').attributes().style).toBe('')
|
||||
})
|
||||
|
||||
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', () => {
|
||||
beforeEach(() => {
|
||||
@ -117,7 +96,6 @@ describe('SearchResults', () => {
|
||||
})
|
||||
})
|
||||
*/
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -199,7 +199,7 @@ export default {
|
||||
},
|
||||
searchCount() {
|
||||
return this.postCount + this.userCount + this.hashtagCount
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clearPage() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user