Skip to content

Update Confidentiality Sidebar and Badge to Support Test Cases

What does this MR do and why?

Relates to #422118 (closed)

As part of &11229 (closed), we will be adding support for creating and editing confidential test cases in the UI.

While test cases will be migrated to the work items framework mid-next year, this is an interim solution to help enable the Quality team to manage test cases within a single source of truth for ongoing confidential projects.

This MR:

  • Updates various UI components used by the sidebar confidentiality widget to allow support for test cases.
  • Adds a new testCaseConfidentialQuery and testCaseConfidentialMutation to be used by the widget.
  • Adds a new optional workspaceType prop to issuable_show_root. This allows test_case_show_root to pass down the correct workspace type to the issuable_header so that the correct confidentiality badge tooltip text can display.
  • Adds improvements to the copy text for the widget and the badge tooltip so that test case will now display instead of test_case

Note: This widget has not been added to the test case sidebar yet. This will be added in #422120 (closed)

Screenshots or screen recordings

Test Case Header Confidentiality Badge

Now correctly references project members rather than group members and test_case now shows as test case

Before After
test_case_confidentiality_badge_before test_case_confidential_badge_after

Test Case Sidebar (Future Changes)

The test case sidebar will have no changes in this MR and the widget will be added to the sidebar in #422120 (closed).

These screenshots show the future changes to help give an idea of what this will look like once the widget is applied.

Confidentiality OFF

Before After
No widget test_case_confidentiality_off

Confidentiality ON

Before After
No widget test_case_confidentiality_on

Other Confidentiality Badges and Sidebars

Other issuables that use confidentiality (issues, epics, incidents, etc.) should show no user-facing changes for the confidentiality badge and sidebar widget.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Ensure your local GDK has an Ultimate license applied
  2. Create a new group and project
  3. Visit the project, and go to Build > Test cases
  4. Create a new test case, and add the /confidential quick action to the description
  5. Hover over the confidential badge in the test case header to verify the tooltip now shows Only project members with at least the Reporter role can view or be notified about this test case.
  6. You can also test creating other issuables, such as issues, epics, tasks, incidents, etc., and verify the confidentiality badge tooltip as well as the confidential sidebar copy text remains unchanged and no regressions occur.

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 Valerie Burton

Merge request reports

Loading