Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Currently, the UnitTestElement
would trigger a mouseenter event but not a mouseover event. This is unexpected since a mouseover should always trigger alongside a mouseenter. I noticed this when I wrote a harness for a component depending on the mouseover event, and thus required a workaround.
I would gladly contribute a fix. However, tests are required and there seems to be no test infrastructure for UnitTestElement yet, which makes it difficult for me to submit a PR right away.
It seems to me the issue would be resolved by simply adding the line
dispatchMouseEvent(this.element, 'mouseover');
here: https://github.com/angular/components/blob/master/src/cdk/testing/testbed/unit-test-element.ts
Reproduction
Steps to reproduce:
- Create a component utilizing mousover.
- Create Harness utilizing the hover to trigger the mouseover.
- Notice that the test will not work as expected.
Expected Behavior
A mouseover event is triggered when using the hover()
method.
Actual Behavior
No mouseover event is triggered when using the hover()
method.
Environment
- Angular: 13.2.4
- CDK/Material: 13.2.4
- Browser(s): Jest
- Operating System (e.g. Windows, macOS, Ubuntu): Fedora and Windows