Include titleHtml in getWorkItemsSlim

What does this MR do and why?

Include titleHtml in getWorkItemsSlim — fixes Work item titles are not rendered in lists when... (#596341 - closed).

We can't remove title per the suggestion in that issue: it's used in screen reader text (and :data-qa-issuable-title, which is less important, but still).

We have no existing pattern of asserting that we request certain items in GraphQL queries, and the only test Duo could come up with was just testing that titleHtml was present in the mock data, which didn't seem useful, so there's no spec change here.

Screenshots or screen recordings

With getWorkItemsFull failure induced artificially per #596341 (closed) (so we can actually see the getWorkItemsSlim response before it's replaced):

Before After
image image

How to set up and validate locally

Copied from #596341 (closed):

  1. Since this is hard to reproduce when the requests are fast, you can update the getWorkItemsFull query so it returns an error.

    Something like:

    diff --git a/ee/app/assets/javascripts/work_items/list/graphql/get_work_items_full.query.graphql b/ee/app/assets/javascripts/work_items/list/graphql/get_work_items_full.query.graphql
    index 50c3c9b51d881..3ce65e3a74a09 100644
    --- a/ee/app/assets/javascripts/work_items/list/graphql/get_work_items_full.query.graphql
    +++ b/ee/app/assets/javascripts/work_items/list/graphql/get_work_items_full.query.graphql
    @@ -106,6 +106,7 @@ query getWorkItemsFullEE(
             ...PageInfo
           }
           nodes {
    +        nonExistentField
             id
             iid
             author {
  2. Visit the work item list

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Asherah Connor

Merge request reports

Loading