Commit deccc605 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '296972-disable-and-consider-rolling-back-adoption-report' into 'master'

Only use top level groups in devops adoption

See merge request gitlab-org/gitlab!51565
parents c3ed338b 36bf03d5
......@@ -13,6 +13,7 @@ export const resolvers = {
const params = {
per_page: Api.DEFAULT_PER_PAGE,
search,
top_level_only: true,
};
if (nextPage) {
params.page = nextPage;
......
---
title: Ensure that only top level groups are fetched for devops adoption
merge_request: 51565
author:
type: fixed
......@@ -23,6 +23,15 @@ describe('DevOps GraphQL resolvers', () => {
});
describe('groups query', () => {
it('only fetches top level groups', async () => {
mockAdapter.onGet(fetchGroupsUrl).reply(httpStatus.OK, groupData, pageData);
await mockClient.query({ query: getGroupsQuery });
expect(mockAdapter.history.get[0].params).toEqual(
expect.objectContaining({ top_level_only: true }),
);
});
it('when receiving groups data', async () => {
mockAdapter.onGet(fetchGroupsUrl).reply(httpStatus.OK, groupData, pageData);
const result = await mockClient.query({ query: getGroupsQuery });
......
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