Merge branch 'develop' into feat/emoji-picker-rich-text-mode

This commit is contained in:
Andy Balaam 2022-12-08 09:39:30 +00:00 committed by GitHub
commit 0f17728aa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 28 deletions

View file

@ -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');
});
});