-
Notifications
You must be signed in to change notification settings - Fork 113
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
[Alerting 2.x] Override element covered check for name input in Composite monitor creation #866
[Alerting 2.x] Override element covered check for name input in Composite monitor creation #866
Conversation
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
When selecting delegate monitors for composite monitor creation, we are typing in the combo box div element which is throwing invalid typing element error. This PR fixes that by selecting the child input element instead. This change is already part of #866 for 2.x Issues Resolved: opensearch-project/alerting-dashboards-plugin#728 Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Should this ported to |
|
||
// Select associated monitors | ||
cy.get('[data-test-subj="monitors_list_0"]').type('monitorOne', { | ||
cy.get('[id="associatedMonitorsList_0"]').type('monitorOne', { |
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.
Q: I'm curious why change from test id to element id? How will that mitigate the flaky test?
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.
This change is for - #872
Basically, we should type inside a valid input element. The test id was selecting the parent div, so changed it to use the id which selects the inner input element
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.
ah in the future, @ruanyl has a great point. You can still get the data subject and then get the id contained with that data test subject.
In this situation is seems like [id]
is more or less in the structure of a data test subj? Perhaps to keep things similar throughout the project covert that id to data-test-subj?
When selecting delegate monitors for composite monitor creation, we are typing in the combo box div element which is throwing invalid typing element error. This PR fixes that by selecting the child input element instead. This change is already part of opensearch-project#866 for 2.x Issues Resolved: opensearch-project/alerting-dashboards-plugin#728 Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Created PR #880 to update all alerting tests in main |
* forcing name typing (#865) Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * [Alerting] use input element for typing (#872) When selecting delegate monitors for composite monitor creation, we are typing in the combo box div element which is throwing invalid typing element error. This PR fixes that by selecting the child input element instead. This change is already part of #866 for 2.x Issues Resolved: opensearch-project/alerting-dashboards-plugin#728 Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * wait before checking update status Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Description
We are seeing flaky behavior when creating composite monitor. The name input element is sometimes not in view which prevents cypress from typing the name. Since this behavior won't happen when a user is creating the monitor it is safe to force the typing in the name element and the monitor selector elements.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.