]> source.dussan.org Git - sonarqube.git/blob
fd82e19493eae87c29f457677d34533946d34de4
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <Fragment>
5   <AlmBindingDefinitionFormField
6     autoFocus={true}
7     help="settings.almintegration.form.name.bitbucketcloud.help"
8     id="name.bitbucket"
9     maxLength={200}
10     onFieldChange={[MockFunction]}
11     propKey="key"
12     value="key"
13   />
14   <AlmBindingDefinitionFormField
15     help={
16       <FormattedMessage
17         defaultMessage="settings.almintegration.form.workspace.bitbucketcloud.help"
18         id="settings.almintegration.form.workspace.bitbucketcloud.help"
19         values={
20           {
21             "example": <React.Fragment>
22               https://bitbucket.org/
23               <strong>
24                 {workspace}
25               </strong>
26               /{repository}
27             </React.Fragment>,
28           }
29         }
30       />
31     }
32     id="workspace.bitbucketcloud"
33     isInvalid={false}
34     maxLength={80}
35     onFieldChange={[MockFunction]}
36     propKey="workspace"
37     value="workspace"
38   />
39   <Alert
40     className="big-spacer-top"
41     variant="info"
42   >
43     <FormattedMessage
44       defaultMessage="settings.almintegration.bitbucketcloud.info"
45       id="settings.almintegration.bitbucketcloud.info"
46       values={
47         {
48           "doc_link": <withAppStateContext(DocLink)
49             to="/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/"
50           >
51             learn_more
52           </withAppStateContext(DocLink)>,
53           "oauth": <ForwardRef(Link)
54             target="_blank"
55             to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
56           >
57             settings.almintegration.bitbucketcloud.oauth
58           </ForwardRef(Link)>,
59           "permission": <strong>
60             Pull Requests: Read
61           </strong>,
62         }
63       }
64     />
65   </Alert>
66   <AlmBindingDefinitionFormField
67     help="settings.almintegration.form.oauth_key.bitbucketcloud.help"
68     id="client_id.bitbucketcloud"
69     maxLength={80}
70     onFieldChange={[MockFunction]}
71     propKey="clientId"
72     value="client1"
73   />
74   <AlmBindingDefinitionFormField
75     help="settings.almintegration.form.oauth_secret.bitbucketcloud.help"
76     id="client_secret.bitbucketcloud"
77     isSecret={true}
78     maxLength={160}
79     onFieldChange={[MockFunction]}
80     overwriteOnly={true}
81     propKey="clientSecret"
82     value="**clientsecret**"
83   />
84 </Fragment>
85 `;
86
87 exports[`should render correctly: invalid workspace ID 1`] = `
88 <Fragment>
89   <AlmBindingDefinitionFormField
90     autoFocus={true}
91     help="settings.almintegration.form.name.bitbucketcloud.help"
92     id="name.bitbucket"
93     maxLength={200}
94     onFieldChange={[MockFunction]}
95     propKey="key"
96     value="key"
97   />
98   <AlmBindingDefinitionFormField
99     error="settings.almintegration.form.workspace.bitbucketcloud.error"
100     help={
101       <FormattedMessage
102         defaultMessage="settings.almintegration.form.workspace.bitbucketcloud.help"
103         id="settings.almintegration.form.workspace.bitbucketcloud.help"
104         values={
105           {
106             "example": <React.Fragment>
107               https://bitbucket.org/
108               <strong>
109                 {workspace}
110               </strong>
111               /{repository}
112             </React.Fragment>,
113           }
114         }
115       />
116     }
117     id="workspace.bitbucketcloud"
118     isInvalid={true}
119     maxLength={80}
120     onFieldChange={[MockFunction]}
121     propKey="workspace"
122     value="my/workspace"
123   />
124   <Alert
125     className="big-spacer-top"
126     variant="info"
127   >
128     <FormattedMessage
129       defaultMessage="settings.almintegration.bitbucketcloud.info"
130       id="settings.almintegration.bitbucketcloud.info"
131       values={
132         {
133           "doc_link": <withAppStateContext(DocLink)
134             to="/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/"
135           >
136             learn_more
137           </withAppStateContext(DocLink)>,
138           "oauth": <ForwardRef(Link)
139             target="_blank"
140             to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
141           >
142             settings.almintegration.bitbucketcloud.oauth
143           </ForwardRef(Link)>,
144           "permission": <strong>
145             Pull Requests: Read
146           </strong>,
147         }
148       }
149     />
150   </Alert>
151   <AlmBindingDefinitionFormField
152     help="settings.almintegration.form.oauth_key.bitbucketcloud.help"
153     id="client_id.bitbucketcloud"
154     maxLength={80}
155     onFieldChange={[MockFunction]}
156     propKey="clientId"
157     value="client1"
158   />
159   <AlmBindingDefinitionFormField
160     help="settings.almintegration.form.oauth_secret.bitbucketcloud.help"
161     id="client_secret.bitbucketcloud"
162     isSecret={true}
163     maxLength={160}
164     onFieldChange={[MockFunction]}
165     overwriteOnly={true}
166     propKey="clientSecret"
167     value="**clientsecret**"
168   />
169 </Fragment>
170 `;