TimelineQueueButtonHeader: fix tests
This commit is contained in:
parent
8baa4cd262
commit
973d3064b5
1 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import { fromJS } from 'immutable';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { defineMessages } from 'react-intl';
|
import { defineMessages } from 'react-intl';
|
||||||
|
|
||||||
|
@ -14,9 +15,11 @@ describe('<TimelineQueueButtonHeader />', () => {
|
||||||
<TimelineQueueButtonHeader
|
<TimelineQueueButtonHeader
|
||||||
key='timeline-queue-button-header'
|
key='timeline-queue-button-header'
|
||||||
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
||||||
count={0}
|
timelineId='home'
|
||||||
message={messages.queue}
|
message={messages.queue}
|
||||||
/>,
|
/>,
|
||||||
|
undefined,
|
||||||
|
{ timelines: fromJS({ home: { totalQueuedItemsCount: 0 } }) },
|
||||||
);
|
);
|
||||||
expect(screen.queryAllByRole('link')).toHaveLength(0);
|
expect(screen.queryAllByRole('link')).toHaveLength(0);
|
||||||
|
|
||||||
|
@ -24,9 +27,11 @@ describe('<TimelineQueueButtonHeader />', () => {
|
||||||
<TimelineQueueButtonHeader
|
<TimelineQueueButtonHeader
|
||||||
key='timeline-queue-button-header'
|
key='timeline-queue-button-header'
|
||||||
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
||||||
count={1}
|
timelineId='home'
|
||||||
message={messages.queue}
|
message={messages.queue}
|
||||||
/>,
|
/>,
|
||||||
|
undefined,
|
||||||
|
{ timelines: fromJS({ home: { totalQueuedItemsCount: 1 } }) },
|
||||||
);
|
);
|
||||||
expect(screen.getByText('Click to see 1 new post', { hidden: true })).toBeInTheDocument();
|
expect(screen.getByText('Click to see 1 new post', { hidden: true })).toBeInTheDocument();
|
||||||
|
|
||||||
|
@ -34,9 +39,11 @@ describe('<TimelineQueueButtonHeader />', () => {
|
||||||
<TimelineQueueButtonHeader
|
<TimelineQueueButtonHeader
|
||||||
key='timeline-queue-button-header'
|
key='timeline-queue-button-header'
|
||||||
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
onClick={() => {}} // eslint-disable-line react/jsx-no-bind
|
||||||
count={9999999}
|
timelineId='home'
|
||||||
message={messages.queue}
|
message={messages.queue}
|
||||||
/>,
|
/>,
|
||||||
|
undefined,
|
||||||
|
{ timelines: fromJS({ home: { totalQueuedItemsCount: 9999999 } }) },
|
||||||
);
|
);
|
||||||
expect(screen.getByText('Click to see 9999999 new posts', { hidden: true })).toBeInTheDocument();
|
expect(screen.getByText('Click to see 9999999 new posts', { hidden: true })).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue