Add QA selectors for quick action buttons on Project UI page
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from gitlab-ce!23366 should be addressed:
-
@sliaquat started a discussion: (+2 comments) Should we use class selector here instead of text? We would need to add a qa class (say
qa-new-file-button) here and for selector sanity check add this to qa/qa/page/component/clone_panel.rb:base.view 'app/presenters/project_presenter.rb' do element :new_file_button end
It looks like they're defined in app/views/projects/_stat_anchor_list.html.haml as:
- anchors = local_assigns.fetch(:anchors, [])
- return unless anchors.any?
%ul.nav
- anchors.each do |anchor|
%li.nav-item
= link_to_if anchor.link, anchor.label, anchor.link, class: anchor.enabled ? 'nav-link stat-link' : "nav-link btn btn-#{anchor.class_modifier || 'missing'}" do
.stat-text= anchor.label
So adding selectors isn't as simple as inserting them here into the .haml. It looks like we might also need to modify app/presenters/project_presenter.rb, which seems to be where the anchors data comes from.
Edited by 🤖 GitLab Bot 🤖