WIP: Add extensible data-qa-* selection mechanisms
What does this MR do?
Closes https://gitlab.com/gitlab-org/quality/team-tasks/issues/197.
Adds the ability to extend the data-qa
selection mechanism to match on additional data attributes.
This is useful in cases such as selecting on a specific item in a collection of items.
Given an iteration over items:
- @projects.each_with_index do |project, idx|
%ul
%li
= link_to project, data: { qa_selector: 'project_link', qa_index: idx }
view '...' do
element :project_link, index: 1 #=> the first project listed
end
...
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
-
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Performance and Testing
Edited by Dan Davison