mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-22 08:57:00 -06:00
Merge pull request #1254 from sbenmoussati/SDA-3292
SDA-3292 Close button hovering fix
This commit is contained in:
commit
816d2efa88
@ -128,4 +128,14 @@ describe('Toast notification component', () => {
|
||||
toastNotificationReplyButton = wrapper.find(replyButtonSelector);
|
||||
expect(toastNotificationReplyButton.exists()).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should trigger mouse hovering function while hovering a notification', async () => {
|
||||
const spy = jest.spyOn(ipcRenderer, 'send');
|
||||
const notificationContainer = wrapper.find(
|
||||
'[data-testid="NOTIFICATION_CONTAINER"]',
|
||||
);
|
||||
expect(notificationContainer).toBeTruthy();
|
||||
notificationContainer.simulate('mouseenter');
|
||||
expect(spy).toBeCalledWith('notification-mouseenter', 0);
|
||||
});
|
||||
});
|
||||
|
@ -157,6 +157,7 @@ export default class NotificationComp extends React.Component<
|
||||
containerCssClass += customCssClasses.join(' ');
|
||||
return (
|
||||
<div
|
||||
data-testid='NOTIFICATION_CONTAINER'
|
||||
className={containerCssClass}
|
||||
style={{
|
||||
height: containerHeight,
|
||||
@ -164,6 +165,8 @@ export default class NotificationComp extends React.Component<
|
||||
borderColor: themeColors.notificationBorderColor,
|
||||
}}
|
||||
lang={i18n.getLocale()}
|
||||
onMouseEnter={this.eventHandlers.onMouseEnter(id)}
|
||||
onMouseLeave={this.eventHandlers.onMouseLeave(id)}
|
||||
>
|
||||
<div
|
||||
className={`close-button ${themeClassName}`}
|
||||
@ -181,8 +184,6 @@ export default class NotificationComp extends React.Component<
|
||||
role='alert'
|
||||
onContextMenu={this.eventHandlers.onContextMenu}
|
||||
onClick={this.eventHandlers.onClick(id)}
|
||||
onMouseEnter={this.eventHandlers.onMouseEnter(id)}
|
||||
onMouseLeave={this.eventHandlers.onMouseLeave(id)}
|
||||
>
|
||||
<div className='logo-container'>{this.renderImage(icon)}</div>
|
||||
<div className='notification-container'>
|
||||
|
Loading…
Reference in New Issue
Block a user