[MM-59907] Migrate tooltips of 'components/threading/global_threads/thread_list/thread_list.tsx' to WithTooltip (#27851)

Этот коммит содержится в:
Rita Anene
2024-08-08 12:13:34 +01:00
коммит произвёл GitHub
родитель 6316606289
Коммит b1960f9c68
3 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@@ -46,9 +46,10 @@ exports[`components/threading/global_threads/thread_list should match snapshot 1
<div <div
className="right-anchor" className="right-anchor"
> >
<SimpleTooltip <WithTooltip
content="Mark all as read"
id="threadListMarkRead" id="threadListMarkRead"
placement="top"
title="Mark all as read"
> >
<Memo(Button) <Memo(Button)
className="Button___large Button___icon" className="Button___large Button___icon"
@@ -64,7 +65,7 @@ exports[`components/threading/global_threads/thread_list should match snapshot 1
/> />
</span> </span>
</Memo(Button)> </Memo(Button)>
</SimpleTooltip> </WithTooltip>
</div> </div>
} }
/> />

Просмотреть файл

@@ -119,7 +119,7 @@ describe('components/threading/global_threads/thread_list', () => {
<ThreadList {...props}/>, <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); expect(openModal).toHaveBeenCalledTimes(1);
}); });

Просмотреть файл

@@ -22,7 +22,7 @@ import NoResultsIndicator from 'components/no_results_indicator';
import CRTListTutorialTip from 'components/tours/crt_tour/crt_list_tutorial_tip'; import CRTListTutorialTip from 'components/tours/crt_tour/crt_list_tutorial_tip';
import CRTUnreadTutorialTip from 'components/tours/crt_tour/crt_unread_tutorial_tip'; import CRTUnreadTutorialTip from 'components/tours/crt_tour/crt_unread_tutorial_tip';
import Header from 'components/widgets/header'; 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 {A11yClassNames, Constants, CrtTutorialSteps, ModalIdentifiers, Preferences} from 'utils/constants';
import * as Keyboard from 'utils/keyboard'; import * as Keyboard from 'utils/keyboard';
@@ -231,12 +231,13 @@ const ThreadList = ({
)} )}
right={( right={(
<div className='right-anchor'> <div className='right-anchor'>
<SimpleTooltip <WithTooltip
id='threadListMarkRead' id='threadListMarkRead'
content={formatMessage({ title={formatMessage({
id: 'threading.threadList.markRead', id: 'threading.threadList.markRead',
defaultMessage: 'Mark all as read', defaultMessage: 'Mark all as read',
})} })}
placement={'top'}
> >
<Button <Button
id={'threads-list__mark-all-as-read'} id={'threads-list__mark-all-as-read'}
@@ -248,7 +249,7 @@ const ThreadList = ({
<PlaylistCheckIcon size={18}/> <PlaylistCheckIcon size={18}/>
</span> </span>
</Button> </Button>
</SimpleTooltip> </WithTooltip>
</div> </div>
)} )}
/> />