diff --git a/webapp/pages/profile/_id/_slug.spec.js b/webapp/pages/profile/_id/_slug.spec.js index 6470bb69a..f7eba10cc 100644 --- a/webapp/pages/profile/_id/_slug.spec.js +++ b/webapp/pages/profile/_id/_slug.spec.js @@ -139,7 +139,23 @@ describe('ProfileSlug', () => { wrapper.setData({ posts, hasMore: true }) }) - it('displays a "load more" button', () => { + it('does not display a "load more" button', () => { + expect(wrapper.find('.load-more').exists()).toBe(false) + }) + }) + + describe('pagination returned at least as many posts as pageSize', () => { + beforeEach(() => { + const posts = [1, 2, 3, 4, 5, 6].map(id => { + return { + ...aPost, + id, + } + }) + wrapper.setData({ posts }) + }) + + it('displays "load more" button', () => { expect(wrapper.find('.load-more').exists()).toBe(true) }) @@ -157,23 +173,6 @@ describe('ProfileSlug', () => { }) }) }) - - describe('pagination returned as many posts as available', () => { - beforeEach(() => { - const posts = [1, 2, 3, 4, 5, 6].map(id => { - return { - ...aPost, - id, - } - }) - - wrapper.setData({ posts, hasMore: false }) - }) - - it('displays no "load more" button', () => { - expect(wrapper.find('.load-more').exists()).toBe(false) - }) - }) }) }) })