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

[Alerting 2.x] Override element covered check for name input in Composite monitor creation #866

Conversation

amsiglan
Copy link
Contributor

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

  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
kavilla pushed a commit that referenced this pull request Sep 18, 2023
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>
@ruanyl
Copy link
Member

ruanyl commented Sep 19, 2023

Should this ported to main?


// Select associated monitors
cy.get('[data-test-subj="monitors_list_0"]').type('monitorOne', {
cy.get('[id="associatedMonitorsList_0"]').type('monitorOne', {
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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?

amsiglan added a commit to amsiglan/opensearch-dashboards-functional-test that referenced this pull request Sep 19, 2023
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>
@amsiglan
Copy link
Contributor Author

Should this ported to main?

Created PR #880 to update all alerting tests in main

@kavilla kavilla merged commit c0595a6 into opensearch-project:2.x Sep 25, 2023
33 of 34 checks passed
kavilla pushed a commit that referenced this pull request Oct 6, 2023
* 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>
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

Successfully merging this pull request may close these issues.

3 participants