feat(cdk/testing): support modifiers for clicking on a TestElement - #20758
Conversation
522382d to
a410ddf
Compare
|
@wwjhu apologies, I missed this PR while I was out on vacation. It looks good, though it does need to be rebased now. |
1da8510 to
f15de07
Compare
|
Rebased. |
|
Given the |
|
Yeah I think that would make sense, people will expect the method signatures to be the same |
| dispatchMouseEvent(this.element, name, clientX, clientY, button); | ||
| await this._stabilize(); | ||
| dispatchMouseEvent(this.element, 'mouseup', clientX, clientY, button, modifiers); | ||
| dispatchMouseEvent(this.element, name, clientX, clientY, button, modifiers); |
There was a problem hiding this comment.
why was await this._stabilize() removed?
There was a problem hiding this comment.
_stabilize is already called from the public entry points click and rightClick that use this private helper. It's not necessary to call it more often.
There was a problem hiding this comment.
can we add a second await this._stabilize() to click to maintain the same behavior that it has currently? I tried presubmitting and it seems maybe some people were depending on that quirk. You can leave a TODO to clean it up later, just don't want it to block this
There was a problem hiding this comment.
Obviously I can, but that second await this._stabilize() was recently added in #20400 which makes that there cannot be many people, if any at all, relying on it
There was a problem hiding this comment.
It's possible the failures I saw were not related to this line. I'll do some more digging and let you know
There was a problem hiding this comment.
I confirmed that removing that call to this._stabilize() was indeed the culprit. It'll need to be investigated, but shouldn't block this PR. Can you add it back with a comment to investigate why removing it breaks some tests in g3?
090bece to
190c03f
Compare
|
Rebased. |
Adds the ability to provide modifier keys when clicking on a TestElement
Update API golden files for cdk/testing.
Update API golden files for ProtractorElement and UnitTestElement.
Adds the ability to provide modifier keys when right clicking on a TestElement
Update API golden files
Indentation and space changes based on review.
190c03f to
f59a50b
Compare
|
Rebased. |
The call to _stabilize should not be needed since the callers will already do that themselves. Nevertheless it breaks some tests in g3 without it. It needs to be investigated why removing breaks those tests.
…ngular#20758) * feat(cdk/testing): support modifiers for clicking on a TestElement Adds the ability to provide modifier keys when clicking on a TestElement * feat(cdk/testing): update cdk/testing public API Update API golden files for cdk/testing. * feat(cdk/testing): update cdk/testing public API Update API golden files for ProtractorElement and UnitTestElement. * feat(cdk/testing): support modifiers for right clicking on a TestElement Adds the ability to provide modifier keys when right clicking on a TestElement * feat(cdk/testing): update cdk/testing public API Update API golden files * feat(cdk/testing): chore: fix spacing Indentation and space changes based on review. * feat(cdk/testing): re-add stabilize call The call to _stabilize should not be needed since the callers will already do that themselves. Nevertheless it breaks some tests in g3 without it. It needs to be investigated why removing breaks those tests.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the ability to provide modifier keys when clicking on a TestElement.