diff --git a/webapp/components/_new/features/SearchResults/SearchResults.spec.js b/webapp/components/_new/features/SearchResults/SearchResults.spec.js index 522b5ee68..875d930ca 100644 --- a/webapp/components/_new/features/SearchResults/SearchResults.spec.js +++ b/webapp/components/_new/features/SearchResults/SearchResults.spec.js @@ -6,15 +6,12 @@ import helpers from '~/storybook/helpers' helpers.init() - const localVue = global.localVue localVue.directive('scrollTo', jest.fn()) config.stubs['client-only'] = '' config.stubs['nuxt-link'] = '' - - 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', () => { }) }) */ - }) }) }) diff --git a/webapp/components/_new/features/SearchResults/SearchResults.vue b/webapp/components/_new/features/SearchResults/SearchResults.vue index 99f300308..b7a58af65 100644 --- a/webapp/components/_new/features/SearchResults/SearchResults.vue +++ b/webapp/components/_new/features/SearchResults/SearchResults.vue @@ -199,7 +199,7 @@ export default { }, searchCount() { return this.postCount + this.userCount + this.hashtagCount - } + }, }, methods: { clearPage() {