Skip to content

Commit

Permalink
[MM-59907] Migrate tooltips of 'components/threading/global_threads/t…
Browse files Browse the repository at this point in the history
…hread_list/thread_list.tsx' to WithTooltip (mattermost#27851)
  • Loading branch information
Camillarhi authored Aug 8, 2024
1 parent 6316606 commit b1960f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ exports[`components/threading/global_threads/thread_list should match snapshot 1
<div
className="right-anchor"
>
<SimpleTooltip
content="Mark all as read"
<WithTooltip
id="threadListMarkRead"
placement="top"
title="Mark all as read"
>
<Memo(Button)
className="Button___large Button___icon"
Expand All @@ -64,7 +65,7 @@ exports[`components/threading/global_threads/thread_list should match snapshot 1
/>
</span>
</Memo(Button)>
</SimpleTooltip>
</WithTooltip>
</div>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('components/threading/global_threads/thread_list', () => {
<ThreadList {...props}/>,
);

wrapper.find(Header).shallow().find({content: 'Mark all as read'}).find(Button).simulate('click');
wrapper.find(Header).shallow().find(Button).find({id: 'threads-list__mark-all-as-read'}).simulate('click');
expect(openModal).toHaveBeenCalledTimes(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import NoResultsIndicator from 'components/no_results_indicator';
import CRTListTutorialTip from 'components/tours/crt_tour/crt_list_tutorial_tip';
import CRTUnreadTutorialTip from 'components/tours/crt_tour/crt_unread_tutorial_tip';
import Header from 'components/widgets/header';
import SimpleTooltip from 'components/widgets/simple_tooltip';
import WithTooltip from 'components/with_tooltip';

import {A11yClassNames, Constants, CrtTutorialSteps, ModalIdentifiers, Preferences} from 'utils/constants';
import * as Keyboard from 'utils/keyboard';
Expand Down Expand Up @@ -231,12 +231,13 @@ const ThreadList = ({
)}
right={(
<div className='right-anchor'>
<SimpleTooltip
<WithTooltip
id='threadListMarkRead'
content={formatMessage({
title={formatMessage({
id: 'threading.threadList.markRead',
defaultMessage: 'Mark all as read',
})}
placement={'top'}
>
<Button
id={'threads-list__mark-all-as-read'}
Expand All @@ -248,7 +249,7 @@ const ThreadList = ({
<PlaylistCheckIcon size={18}/>
</span>
</Button>
</SimpleTooltip>
</WithTooltip>
</div>
)}
/>
Expand Down

0 comments on commit b1960f9

Please sign in to comment.