Commit 5b72cb19 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'fix-da-not-sending-displaynamespaceid' into 'master'

DevOps Adoption - ensure displayNamespaceId is included

See merge request gitlab-org/gitlab!64397
parents 2694d7ea 0b895967
......@@ -38,6 +38,9 @@ export default {
isGroup: {
default: false,
},
groupGid: {
default: null,
},
},
props: {
groups: {
......
......@@ -8,7 +8,12 @@ import bulkEnableDevopsAdoptionNamespacesMutation from 'ee/analytics/devops_repo
import createMockApollo from 'helpers/mock_apollo_helper';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { groupNodes, devopsAdoptionNamespaceData, genericDeleteErrorMessage } from '../mock_data';
import {
groupNodes,
groupGids,
devopsAdoptionNamespaceData,
genericDeleteErrorMessage,
} from '../mock_data';
const localVue = createLocalVue();
Vue.use(VueApollo);
......@@ -123,16 +128,23 @@ describe('DevopsAdoptionAddDropdown', () => {
});
describe('on row click', () => {
describe('sucessful request', () => {
describe.each`
level | groupGid
${'group'} | ${groupGids[0]}
${'admin'} | ${null}
`('$level level sucessful request', ({ groupGid }) => {
beforeEach(() => {
createComponent({ props: { hasSubgroups: true, groups: groupNodes } });
createComponent({
props: { hasSubgroups: true, groups: groupNodes },
provide: { groupGid },
});
clickFirstRow();
});
it('makes a request to enable the selected group', () => {
expect(mutate).toHaveBeenCalledWith({
displayNamespaceId: undefined,
displayNamespaceId: groupGid,
namespaceIds: ['gid://gitlab/Group/1'],
});
});
......
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