From 6d53dc22e8015a0b65536be6b62aeb5b425fc067 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Tue, 31 Aug 2021 14:40:23 +0200 Subject: [PATCH] SONAR-15322 Fix DevOps platform field's max length disprecancies --- .../js/apps/settings/components/almIntegration/AzureForm.tsx | 1 + .../components/almIntegration/BitbucketCloudForm.tsx | 5 +++-- .../components/almIntegration/BitbucketServerForm.tsx | 2 +- .../apps/settings/components/almIntegration/GithubForm.tsx | 1 + .../apps/settings/components/almIntegration/GitlabForm.tsx | 1 + .../__tests__/__snapshots__/AzureForm-test.tsx.snap | 2 ++ .../__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap | 5 +++-- .../__snapshots__/BitbucketServerForm-test.tsx.snap | 2 +- .../__tests__/__snapshots__/GithubForm-test.tsx.snap | 2 ++ .../__tests__/__snapshots__/GitlabForm-test.tsx.snap | 2 ++ .../org/sonar/server/almsettings/ws/CreateGithubAction.java | 4 ++-- .../server/almsettings/ws/UpdateBitbucketCloudAction.java | 5 +++-- 12 files changed, 22 insertions(+), 10 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx index 128f260f341..cedafcad2dd 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx @@ -42,6 +42,7 @@ export default function AzureForm(props: AzureFormProps) { onFieldChange={onFieldChange} propKey="key" value={formData.key} + maxLength={200} /> } id="workspace.bitbucketcloud" - maxLength={2000} + maxLength={80} onFieldChange={props.onFieldChange} propKey="workspace" value={formData.workspace || ''} @@ -96,6 +96,7 @@ export default function BitbucketCloudForm(props: BitbucketCloudFormProps) { onFieldChange={props.onFieldChange} propKey="clientId" value={formData.clientId || ''} + maxLength={80} /> } id="workspace.bitbucketcloud" - maxLength={2000} + maxLength={80} onFieldChange={[MockFunction]} propKey="workspace" value="workspace" @@ -69,6 +69,7 @@ exports[`should render correctly 1`] = `