Commit 27646fff authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fixes-35624' into 'master'

Fixes 35624

See merge request gitlab-org/gitlab!20092
parents aea027f7 04cc8b46
......@@ -17,6 +17,7 @@ const handleUserPopoverMouseOut = event => {
renderedPopover.$destroy();
renderedPopover = null;
}
target.removeAttribute('aria-describedby');
};
/**
......
---
title: Resets aria-describedby on mouseleave
merge_request: 20092
author: carolcarvalhosa
type: fixed
......@@ -38,6 +38,7 @@ describe('User Popovers', () => {
const shownPopover = document.querySelector('.popover');
expect(shownPopover).not.toBeNull();
expect(targetLink.getAttribute('aria-describedby')).not.toBeNull();
expect(shownPopover.innerHTML).toContain(dummyUser.name);
expect(UsersCache.retrieveById).toHaveBeenCalledWith(userId.toString());
......@@ -47,6 +48,7 @@ describe('User Popovers', () => {
setTimeout(() => {
// After Mouse leave it should be hidden now
expect(document.querySelector('.popover')).toBeNull();
expect(targetLink.getAttribute('aria-describedby')).toBeNull();
done();
});
}, 210); // We need to wait until the 200ms mouseover delay is over, only then the popover will be visible
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment