lint: clean

This commit is contained in:
ogerly 2020-04-22 19:03:45 +02:00
parent cccb6cec83
commit 404b926a1f
2 changed files with 13 additions and 35 deletions

View File

@ -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', () => {
})
})
*/
})
})
})

View File

@ -199,7 +199,7 @@ export default {
},
searchCount() {
return this.postCount + this.userCount + this.hashtagCount
}
},
},
methods: {
clearPage() {