You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
Change formatting buttons behavior (#9715)
Change formatting buttons behaviour
This commit is contained in:
@@ -75,4 +75,20 @@ describe('FormattingButtons', () => {
|
||||
// Then
|
||||
expect(await screen.findByText('Bold')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('Should not have hover style when active', async () => {
|
||||
// When
|
||||
const user = userEvent.setup();
|
||||
render(<FormattingButtons composer={wysiwyg} actionStates={actionStates} />);
|
||||
await user.hover(screen.getByLabelText('Bold'));
|
||||
|
||||
// Then
|
||||
expect(screen.getByLabelText('Bold')).not.toHaveClass('mx_FormattingButtons_Button_hover');
|
||||
|
||||
// When
|
||||
await user.hover(screen.getByLabelText('Underline'));
|
||||
|
||||
// Then
|
||||
expect(screen.getByLabelText('Underline')).toHaveClass('mx_FormattingButtons_Button_hover');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user