]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13987 Display validation for Bitbucket server
authorJeremy Davis <jeremy.davis@sonarsource.com>
Tue, 27 Oct 2020 16:05:44 +0000 (17:05 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 4 Nov 2020 20:05:48 +0000 (20:05 +0000)
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/utils.ts

index 61b13508898618ad51e9d6301b409b7294b253b4..fc05d4faaa670fb969c2fcd30b04c8694fbf922b 100644 (file)
@@ -32,7 +32,7 @@ import { AlmIntegration } from '../AlmIntegration';
 jest.mock('../../../../../api/alm-settings', () => ({
   countBindedProjects: jest.fn().mockResolvedValue(0),
   deleteConfiguration: jest.fn().mockResolvedValue(undefined),
-  getAlmDefinitions: jest.fn().mockResolvedValue({ github: [], gitlab: [] }),
+  getAlmDefinitions: jest.fn().mockResolvedValue({ bitbucket: [], github: [], gitlab: [] }),
   validateAlmSettings: jest.fn().mockResolvedValue('')
 }));
 
@@ -56,6 +56,8 @@ it('should validate existing configurations', async () => {
 
   await waitAndUpdate(wrapper);
 
+  expect(validateAlmSettings).toBeCalledTimes(4);
+  expect(validateAlmSettings).toBeCalledWith('b1');
   expect(validateAlmSettings).toBeCalledWith('gh1');
   expect(validateAlmSettings).toBeCalledWith('gh2');
   expect(validateAlmSettings).toBeCalledWith('gl1');
index e35666345638ad6c2d1a80f3017de087e90bc081..5de5535b294ef16aa9bfc2e8abe856c74f26d404 100644 (file)
@@ -19,4 +19,4 @@
  */
 import { AlmKeys } from '../../../../types/alm-settings';
 
-export const VALIDATED_ALMS = [AlmKeys.GitHub, AlmKeys.GitLab];
+export const VALIDATED_ALMS = [AlmKeys.Bitbucket, AlmKeys.GitHub, AlmKeys.GitLab];