diff options
author | Ambroise C <ambroise.christea@sonarsource.com> | 2024-12-06 14:33:47 +0100 |
---|---|---|
committer | Steve Marion <steve.marion@sonarsource.com> | 2024-12-18 11:13:22 +0100 |
commit | 27be0a49139772c373ecf9663962a027140b6640 (patch) | |
tree | 497806ade2be6a5e9b3cf853737d6e0d862c24c9 /server/sonar-web/src/main/js/apps/create/project | |
parent | 197f74d0b86b047a56b1984d209b48067a469d72 (diff) | |
download | sonarqube-27be0a49139772c373ecf9663962a027140b6640.tar.gz sonarqube-27be0a49139772c373ecf9663962a027140b6640.zip |
SONAR-23268 Remove duplicate API function
Diffstat (limited to 'server/sonar-web/src/main/js/apps/create/project')
-rw-r--r-- | server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx | 3 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx index 394d290ad1a..cf2eee4d40b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx @@ -25,7 +25,6 @@ import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getBitbucketServerProjects, getBitbucketServerRepositories, - searchForBitbucketServerRepositories, } from '../../../../api/alm-integrations'; import { BitbucketProject, BitbucketRepository } from '../../../../types/alm-integration'; import { AlmKeys } from '../../../../types/alm-settings'; @@ -180,7 +179,7 @@ export default function BitbucketProjectCreate({ defaultRepositorySelect, fetchData, fetchSearchResults: (query: string, dopKey: string) => - searchForBitbucketServerRepositories(dopKey, query), + getBitbucketServerRepositories(dopKey, undefined, query), getRepositoryKey: ({ slug }) => slug, isMonorepoSetup, selectedDopSetting, diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx index 2bee7a314df..63ae76ba168 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx @@ -22,7 +22,7 @@ import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; -import { searchForBitbucketServerRepositories } from '../../../../api/alm-integrations'; +import { getBitbucketServerRepositories } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock'; import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock'; @@ -170,8 +170,9 @@ it('should show search filter when PAT is already set', async () => { await user.keyboard('search'); await waitFor(() => - expect(searchForBitbucketServerRepositories).toHaveBeenLastCalledWith( + expect(getBitbucketServerRepositories).toHaveBeenLastCalledWith( 'conf-bitbucketserver-2', + undefined, 'search', ), ); |