-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(angular): add timeout to avoid flaky value accessor test #25522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the this.didInit
added in the first place? I am worried this may accidentally regress some other behavior.
Would it be possible to have the test wait for the component to fully load instead? |
Inconclusive based on the original PR not having a description or referencing an issue. I have two theories:
Cypress should be able to automatically determine when the page has loaded to run the test suite. Outside of an arbitrary timeout, I don't know how to best wait for that component to be loaded here. If we are uncomfortable with changing this behavior, it definitely can be removed in v7 with the RFC we are working on right now. In the interim, we could add a timeout + tech debt task to remove it in v7. Alternatively, the E2E test is only really checking 3 of our components for validity behavior. We could temporarily disable the |
Do you think the issue that the |
Yes, I think the checks were to work around the value accessors setting the value before the web component With our proposed changes in the RFC, setting the value from the value accessor should not emit |
Can we keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this. Don't forget to change the commit subject when merging so this doesn't get logged as a bug.
Thanks for the reminder; updated title + description, will wait for Amanda's review before merge 👍 |
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Occasionally the Angular E2E test suite will fail when validating if setting a value changes the form status of the control.
Upon debugging this failing test, it appears to be the result of
ion-select
. After assigning the value, the control continues to have theion-invalid
class, which means that the value accessor never received theionChange
event.Theory is that the value is set by Cypress before the component fully loads. By removing the safe guard, the event is still able to fire prior to the
componentDidLoad
resolving.Issue URL: N/A
What is the new behavior?
ionChange
RFC is approvedDoes this introduce a breaking change?
Other information