Skip to content

Improve test case action dropdown

What does this MR do and why?

Initially, this migrated the test cases actions dropdown to GlDisclosureDropdown. However, there was a concurring migration initiative which was merged first: !134276 (merged).

As a result, this migration isn't relevant anymore, but instead of closing this MR, we are re-purposing it to do a few improvements:

  • Replaced some Bootstrap utils with GitLab UI ones.
  • Dropped slot override in favor of native GlDisclosureDropdownItem API.
  • Moved "New test case" dropdown item to a group.
  • Right-positioned the dropdown.
  • Rewrote the specs to trigger the request via actual UI interactions.
  • Added tests for toggling state changes via the dropdown.
Changelog: changed
EE: true

Screenshots or screen recordings

Before !134276 (merged) After !134276 (merged) This MR
Screenshot_2023-10-13_at_9.24.22_AM Screenshot_2023-10-17_at_7.38.47_AM Screenshot_2023-10-13_at_9.22.35_AM

How to set up and validate locally

  1. Follow the steps at https://docs.gitlab.com/ee/ci/test_cases/#create-a-test-case to create a test case.
  2. Navigate to the test case you just created.
  3. Resize the window to a mobile device's width.
  4. Click on the Options button in the header.

MR acceptance checklist

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

Related to #418029 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports