-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] EuiComboBox incorrectly enters invalid state #8
Comments
Adding new dashboard test suite to the demo functional test, as well as updating the method of verifying the OpenSearch Dashboards home page has loaded properly. Adds known flakiness through the testing of the EuiComboBox element, which introduces inconsistent behavior with the ComboBox “isinvalid” state when trying to click on an option after entering text in the search box. This bug is further discussed in #8. Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adding new dashboard test suite to the demo functional test, as well as updating the method of verifying the OpenSearch Dashboards home page has loaded properly. Adds known flakiness through the testing of the EuiComboBox element, which introduces inconsistent behavior with the ComboBox “isinvalid” state when trying to click on an option after entering text in the search box. This bug is further discussed in #8. Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes (described in #8). Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes that is minimized through the use of a helper function that adds dashboard filters (described in #8). This commit also adds custom Cypress commands that perform common UI interactions, such as setting a filter in a dashboard or checking for the exi stence of a specified UI element. These custom Cypress commands should help with the readability of test files, and well as make it easier to develop new functional tests. Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes that is minimized through the use of a helper function that adds dashboard filters (described in #8). This commit also adds custom Cypress commands that perform common UI interactions, such as setting a filter in a dashboard or checking for the exi stence of a specified UI element. These custom Cypress commands should help with the readability of test files, and well as make it easier to develop new functional tests. Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Issue UpdateI have found a temporary solution that prevents EuiComboBox fields from incorrectly entering an invalid state when selecting an option, which has helped reduce inconsistency when interacting with the
The function above is being added in #14, and is being used inside of a larger helper function that handles adding a dashboard filter. Since starting to use this approach for selecting combo box options, I have not yet encountered the invalid state issue, although this is only empirical evidence for the inconsistency being resolved. Explanation
The above code is one of my previous attempts to select an option from a combo box list, which have generally utilized the Cypress And the following image shows the mouse events during a Based on the error message in the Given this hypothesis, a possible solution to preventing the inconsistent invalid state was to eliminate the race condition altogether by not performing the default mouse actions leading up to the click. This was implemented by using the Cypress |
Adds a new Cypress test file dashboard_filtering_spec.js, which tests whether dashboard visualizations properly update when applying and disabling filters. This functional test is a Cypress adaptation of the dashboard_filtering.js test file from OpenSearch Dashboards, which originally used the Selenium framework. The mapping and index archives used in the OpenSearch Dashboards test have been added to the fixtures directory. The test file is incomplete, and lacks the functionality to import the indices and data used in the test to OpenSearch. The test also contains known inconsistent behavior with combo boxes that is minimized through the use of a helper function that adds dashboard filters (described in #8). This commit also adds custom Cypress commands that perform common UI interactions, such as setting a filter in a dashboard or checking for the exi stence of a specified UI element. These custom Cypress commands should help with the readability of test files, and well as make it easier to develop new functional tests. Signed-off-by: Aviv Benchorin <benchori@amazon.com>
Describe the bug
When searching for a specific option in a EuiComboBox field and clicking on the desired option, the element sometimes enters an
invalid
state rather than select the option. Theinvalid
state is visually indicated through a red line along the bottom of the input field.This bug happens inconsistently, and usually results in the test case failing due to preventing Cypress from performing subsequent interactions with UI elements (e.g. Cypress being unable to press the submit button since the option was not properly selected). It is likely caused by a race condition between the combo box re-rendering after the selection of the option and the combo box checking whether it is in the
invalid
state.To Reproduce
This bug is difficult to reproduce at-will due to it occurring inconsistently. The current best method would be:
.only()
to the 'Explore the data in the dashboard' test suite in thedemo_spec.js
file (e.g.it.only('Explore the data in the dashboard',...
)npx cypress open
) and run thedemo_spec.js
testGnomehouse
in the Manufacturer field or when selectingday_of_week
in theAdd filter
field inputExpected behavior
Cypress should consistently be able to type into the input field of the combo box, find the desired option, and click on the option to select it without the combo box entering an invalid state.
OpenSearch Version
1.0.0-SNAPSHOT
Dashboards Version
1.0.0
Additional Context
The EuiComboBox is a option list UI element that allows users to search for options and select multiple options if wanted. The OpenSearch Dashboards interface uses combo boxes to handle functionality that potentially requires searching a large number of options, such as in the
Add filter
panel.When developing OpenSearch Dashboards functional tests in Cypress, the standard approach to select an option in a combo box has been the following series of actions:
add Filter
button)Field
input and typeday_of_week
)day_of_week
)day_of_week
option)The bug of entering the
invalid
state has been occurring in step 4, after clicking the button. The EuiComboBox source code contains the following comments and code about the invalid state:The above indicates that the
invalid
state is being caused by the list being closed or losing focus while there is still asearchValue
in the input. This suggests that in the context of the bug, there is likely a race condition created when the option is clicked and the option list closes:searchValue
and preventing theinvalid
state from being true.invalid
state first and finds that the list is closed and thesearchValue
is filled, concluding that theinvalid
state is true.Assuming that this evaluation of the bug's cause is correct, the fix will likely involve addressing this race condition and ensuring that the option selection completes before checking the invalid state.
The text was updated successfully, but these errors were encountered: