Commit ef065e54 authored by Coung Ngo's avatar Coung Ngo

Update issues refactor to use `blockingCount` field

The `blockingCount` field was recently added to the
GraphQL Issue type. This commit updates the issues
refactor to use this new field, rather than the
`blockedByCount` field it used before, so it
displays the UI blocking count exactly the same
as on the current Haml page.

https://gitlab.com/gitlab-org/gitlab/-/issues/322755
parent 965bb0d6
......@@ -691,8 +691,9 @@ export default {
</li>
<blocking-issues-count
class="blocking-issues gl-display-none gl-sm-display-block"
:blocking-issues-count="issuable.blockedByCount"
:blocking-issues-count="issuable.blockingCount"
:is-list-item="true"
data-testid="blocking-issues"
/>
</template>
......
......@@ -47,7 +47,7 @@ query getProjectIssues(
}
nodes {
...IssueFragment
blockedByCount
blockingCount
healthStatus
weight
}
......
......@@ -21,12 +21,8 @@ RSpec.describe 'Blocking issues count' do
end
it 'sorts by blocking', :js do
find('.filter-dropdown-container .dropdown').click
page.within('ul.dropdown-menu.dropdown-menu-right li') do
expect(page).to have_content('Blocking')
click_link("Blocking")
end
click_button 'Created date'
click_on 'Blocking'
page.within(".issues-list") do
page.within("li.issue:nth-child(1)") do
......
......@@ -78,7 +78,7 @@ describe('IssuesListApp component', () => {
let defaultQueryResponse = getIssuesQueryResponse;
if (IS_EE) {
defaultQueryResponse = cloneDeep(getIssuesQueryResponse);
defaultQueryResponse.data.project.issues.nodes[0].blockedByCount = 1;
defaultQueryResponse.data.project.issues.nodes[0].blockingCount = 1;
defaultQueryResponse.data.project.issues.nodes[0].healthStatus = null;
defaultQueryResponse.data.project.issues.nodes[0].weight = 5;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment