wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Add identifiers to items to improve automated test performance - Rule Page
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: Create a new custom rule
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.
We need to create data-test attributes for the next components:
rulesButtonSelector: '[class="euiSideNavItem euiSideNavItem--trunk"]',
titleSelector: '[class="euiTitle euiTitle--medium"]',
tableSelector: '[class="euiTableRow customRowClass euiTableRow-isClickable"]',
dropdownPaginationSelector: '[data-test-subj="tablePaginationPopoverButton"]',
listPagesSelector: 'nav[class="euiPagination"]',
customRulesButtonSelector: '.euiButtonGroupButton.euiButtonGroupButton--text'
XMLFileSelector