wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Add identifiers to items to improve automated test performance - Agent Filter component
With the automated test, we detected that there are a lot of components in our app that does not have a unique identification that could be usable in our automated test cases. This can be very hard to manage by using XPath and a long CSS selector. So we create this issue to handle the first id refactor.
The idea is to add or replace the "data-test" attribute in all the elements in the DOM that could be useful for the automated test.
Analyzed feature: Agent module menu and filter components.
Any of the modules on this component has not data-test attributes or usable ids.
Today we are using very long CSS selectors to execute our test.
The "More" button that is displayed on this screen neither has a data-test attribute, right now we are working with an XPath expression. It would be useful to add a data-test attribute to this button too.
The other section where data-test attributes should be updated is on the filter window.
Add a data-test attribute to the "Events" button Add a data-test attribute to the "Remove Filters" button
Here we find a random test failure that could be related to these attributes. I suggest to analyze this problem together (Devs and QA team)