Protecting a tag form instantiated twice when using vite
This bug was caught by an E2E test when using Vite only.
When loading with Vite, occasionally two elements are present:

Test metadata (don't modify)
| Field | Value |
|---|---|
| File URL | qa/qa/specs/features/browser_ui/3_create/repository/protected_tags_spec.rb#L66 |
| Filename | qa/specs/features/browser_ui/3_create/repository/protected_tags_spec.rb |
| Description | Create Repository tags when protected behaves like successful tag creation can be created by maintainer_user |
| Test level | |
| Hash | bb7d050e37978121db4cffa52291c7888265a5984 |
| Duration | 72.47 seconds |
| Expected duration | < 240 seconds |
| Test case | https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347928 |
Stack trace
Failure/Error: protected_tags.choose_access_level_role(role)
Capybara::Ambiguous:
Ambiguous match, found 2 elements matching visible css "[data-testid=\"allowed-to-create-dropdown\"],[data-qa-selector=\"allowed-to-create-dropdown\"]" within #<Capybara::Node::Element tag="section" path="/HTML/BODY[1]/DIV[2]/DIV[2]/DIV[3]/MAIN[1]/DIV[3]/SECTION[2]">
Shared Example Group: "successful tag creation" called from ./qa/specs/features/browser_ui/3_create/repository/protected_tags_spec.rb:66
Screenshot
Reports (2)
Edited by Jay McCure
