Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test support for waiting on property or attribute changes #52

Open
nwhittaker opened this issue Sep 14, 2022 · 0 comments
Open

Test support for waiting on property or attribute changes #52

nwhittaker opened this issue Sep 14, 2022 · 0 comments

Comments

@nwhittaker
Copy link

When programmatically changing a Stencil element's properties or attributes, the change is propagated asynchronously. In a test environment, it's typical to set a property or attribute on an element and then verify some change occurred. However, with a stencil component, it's difficult to reliably determine when it's safe to inspect the element for the changed behavior.

Stencil's own testing tools provide ways to wait for property/attribute changes to take effect:

I tried awaiting on nextRAF(), but that didn't seem to guarantee anything about the state of the stencil element and still lead to random failures.

This latency has been a significant point of pain for writing tests. Is it possible to get a test helper, or something, that provides a way to wait for property and attribute changes to take effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant