Skip to content

E2E test: click correct dropdown element

Jay McCure requested to merge jmc-fix-project-template-spec into master

What does this MR do and why?

Resolves #420269 (closed), #407699 (closed) where there were two buttons with the same text, causing an ambiguous match.

Previously: within_element(:select_namespace_dropdown) { click_button namespace } would lead to an ambiguous match error (occasionally), since there was two "buttons" with the namespace string. With select_item(namespace, css: '.gl-dropdown-item') we limit our search to only clicking dropdown items.

The ambiguous match was from the text in the dropdown AND the text in the dropdown item. We only want the dropdown item. Screenshot_2023-08-01_at_16.46.08

How to set up and validate locally

QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=http://192.168.4.31:3000 bundle exec rspec qa/specs/features/ee/browser_ui/3_create/repository/project_templates_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jay McCure

Merge request reports