From 973d3064b54b32522fd0d7bf107c014bffbc260a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 2 Jun 2022 20:46:18 -0500 Subject: [PATCH] TimelineQueueButtonHeader: fix tests --- .../__tests__/timeline_queue_button_header.test.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/soapbox/components/__tests__/timeline_queue_button_header.test.js b/app/soapbox/components/__tests__/timeline_queue_button_header.test.js index 6874452ae..155179551 100644 --- a/app/soapbox/components/__tests__/timeline_queue_button_header.test.js +++ b/app/soapbox/components/__tests__/timeline_queue_button_header.test.js @@ -1,3 +1,4 @@ +import { fromJS } from 'immutable'; import React from 'react'; import { defineMessages } from 'react-intl'; @@ -14,9 +15,11 @@ describe('', () => { {}} // eslint-disable-line react/jsx-no-bind - count={0} + timelineId='home' message={messages.queue} />, + undefined, + { timelines: fromJS({ home: { totalQueuedItemsCount: 0 } }) }, ); expect(screen.queryAllByRole('link')).toHaveLength(0); @@ -24,9 +27,11 @@ describe('', () => { {}} // eslint-disable-line react/jsx-no-bind - count={1} + timelineId='home' message={messages.queue} />, + undefined, + { timelines: fromJS({ home: { totalQueuedItemsCount: 1 } }) }, ); expect(screen.getByText('Click to see 1 new post', { hidden: true })).toBeInTheDocument(); @@ -34,9 +39,11 @@ describe('', () => { {}} // eslint-disable-line react/jsx-no-bind - count={9999999} + timelineId='home' message={messages.queue} />, + undefined, + { timelines: fromJS({ home: { totalQueuedItemsCount: 9999999 } }) }, ); expect(screen.getByText('Click to see 9999999 new posts', { hidden: true })).toBeInTheDocument(); });