You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a test to expose the bug explained here: #2330
The bug is clearly reproducible when I try it manually.
But when I try to expose this bad behavior as an automated test, it starts acting correctly.
After running this code snippet, the normal button logs to the console 2 times, but the lion-button logs to the console 3 times. The normal button is behaving correctly and not handling clicks when its disabled.
I guess the right approach is to remove that extra line (which imports @webcomponents/scoped-custom-element-registry), and instead every test that needs it, should import it independently. Importing it for all tests affects tests behavior (which is bad). It gives us false confidence that our components is working fine, but in the real world, not everyone is importing @webcomponents/scoped-custom-element-registry)
I'm cooking an MR for this 🧑🍳
The text was updated successfully, but these errors were encountered:
Expected behavior
I'm trying to write a test to expose the bug explained here: #2330
The bug is clearly reproducible when I try it manually.
But when I try to expose this bad behavior as an automated test, it starts acting correctly.
Actual Behavior
Take this reproduction link: https://studio.webcomponents.dev/edit/CdTHK8iuVNqVSuive1NH/src/index.js?p=README.md
It contains this code snippet:
After running this code snippet, the normal button logs to the console 2 times, but the lion-button logs to the console 3 times. The normal button is behaving correctly and not handling clicks when its disabled.
Now look at the new test in this PR: #2352
Additional context
I guess the right approach is to remove that extra line (which imports
@webcomponents/scoped-custom-element-registry
), and instead every test that needs it, should import it independently. Importing it for all tests affects tests behavior (which is bad). It gives us false confidence that our components is working fine, but in the real world, not everyone is importing@webcomponents/scoped-custom-element-registry
)I'm cooking an MR for this 🧑🍳
The text was updated successfully, but these errors were encountered: