Simplify column headers (#27557)
This commit is contained in:
1 parent
1f5187e2e2
commit
13d310e64d
13 files changed
+113
-125
No files matched your search
@@ -1,13 +1,15 @@
|
||||
import { render, fireEvent, screen } from '@testing-library/react';
|
||||
import { render, fireEvent, screen } from 'mastodon/test_helpers';
|
||||
|
||||
import Column from '../column';
|
||||
|
||||
const fakeIcon = () => <span />;
|
||||
|
||||
describe('<Column />', () => {
|
||||
describe('<ColumnHeader /> click handler', () => {
|
||||
it('runs the scroll animation if the column contains scrollable content', () => {
|
||||
const scrollToMock = jest.fn();
|
||||
const { container } = render(
|
||||
<Column heading='notifications'>
|
||||
<Column heading='notifications' icon='notifications' iconComponent={fakeIcon}>
|
||||
<div className='scrollable' />
|
||||
</Column>,
|
||||
);
|
||||
@@ -17,7 +19,7 @@ describe('<Column />', () => {
|
||||
});
|
||||
|
||||
it('does not try to scroll if there is no scrollable content', () => {
|
||||
render(<Column heading='notifications' />);
|
||||
render(<Column heading='notifications' icon='notifications' iconComponent={fakeIcon} />);
|
||||
fireEvent.click(screen.getByText('notifications'));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user