]> source.dussan.org Git - sonarqube.git/blob
5e1897ca5c10684f5d98bd4a9bd552496148d52f
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <span
5   className="big-spacer-left flex-0 branch-like-navigation-toggler-container"
6 >
7   <Memo(CurrentBranchLike)
8     branchesEnabled={false}
9     component={
10       Object {
11         "analysisDate": "2021-01-01 01:01:01",
12         "breadcrumbs": Array [],
13         "key": "my-project",
14         "name": "MyProject",
15         "qualifier": "TRK",
16         "qualityGate": Object {
17           "isDefault": true,
18           "key": "30",
19           "name": "Sonar way",
20         },
21         "qualityProfiles": Array [
22           Object {
23             "deleted": false,
24             "key": "my-qp",
25             "language": "ts",
26             "name": "Sonar way",
27           },
28         ],
29         "tags": Array [],
30       }
31     }
32     currentBranchLike={
33       Object {
34         "analysisDate": "2018-01-01",
35         "excludedFromPurge": true,
36         "isMain": false,
37         "name": "branch-11",
38       }
39     }
40     hasManyBranches={true}
41   />
42 </span>
43 `;
44
45 exports[`should render the menu trigger if branches are enabled 1`] = `
46 <span
47   className="big-spacer-left flex-0 branch-like-navigation-toggler-container dropdown"
48 >
49   <Toggler
50     onRequestClose={[Function]}
51     open={false}
52     overlay={
53       <withRouter(Menu)
54         branchLikes={
55           Array [
56             Object {
57               "analysisDate": "2018-01-01",
58               "excludedFromPurge": true,
59               "isMain": false,
60               "name": "branch-11",
61             },
62             Object {
63               "analysisDate": "2018-01-01",
64               "excludedFromPurge": true,
65               "isMain": false,
66               "name": "branch-1",
67             },
68             Object {
69               "analysisDate": "2018-01-01",
70               "excludedFromPurge": true,
71               "isMain": true,
72               "name": "master",
73             },
74             Object {
75               "analysisDate": "2018-01-01",
76               "base": "master",
77               "branch": "feature/foo/bar",
78               "key": "1",
79               "target": "master",
80               "title": "PR-1",
81             },
82             Object {
83               "analysisDate": "2018-01-01",
84               "excludedFromPurge": true,
85               "isMain": false,
86               "name": "branch-12",
87             },
88             Object {
89               "analysisDate": "2018-01-01",
90               "base": "master",
91               "branch": "feature/foo/bar",
92               "key": "2",
93               "target": "master",
94               "title": "PR-2",
95             },
96             Object {
97               "analysisDate": "2018-01-01",
98               "excludedFromPurge": true,
99               "isMain": false,
100               "name": "branch-3",
101             },
102             Object {
103               "analysisDate": "2018-01-01",
104               "excludedFromPurge": true,
105               "isMain": false,
106               "name": "branch-2",
107             },
108             Object {
109               "analysisDate": "2018-01-01",
110               "base": "master",
111               "branch": "feature/foo/bar",
112               "isOrphan": true,
113               "key": "2",
114               "target": "llb-100",
115               "title": "PR-2",
116             },
117           ]
118         }
119         component={
120           Object {
121             "analysisDate": "2021-01-01 01:01:01",
122             "breadcrumbs": Array [],
123             "key": "my-project",
124             "name": "MyProject",
125             "qualifier": "TRK",
126             "qualityGate": Object {
127               "isDefault": true,
128               "key": "30",
129               "name": "Sonar way",
130             },
131             "qualityProfiles": Array [
132               Object {
133                 "deleted": false,
134                 "key": "my-qp",
135                 "language": "ts",
136                 "name": "Sonar way",
137               },
138             ],
139             "tags": Array [],
140           }
141         }
142         currentBranchLike={
143           Object {
144             "analysisDate": "2018-01-01",
145             "excludedFromPurge": true,
146             "isMain": false,
147             "name": "branch-11",
148           }
149         }
150         onClose={[Function]}
151       />
152     }
153   >
154     <a
155       className="link-base-color link-no-underline"
156       href="#"
157       onClick={[Function]}
158     >
159       <Memo(CurrentBranchLike)
160         branchesEnabled={true}
161         component={
162           Object {
163             "analysisDate": "2021-01-01 01:01:01",
164             "breadcrumbs": Array [],
165             "key": "my-project",
166             "name": "MyProject",
167             "qualifier": "TRK",
168             "qualityGate": Object {
169               "isDefault": true,
170               "key": "30",
171               "name": "Sonar way",
172             },
173             "qualityProfiles": Array [
174               Object {
175                 "deleted": false,
176                 "key": "my-qp",
177                 "language": "ts",
178                 "name": "Sonar way",
179               },
180             ],
181             "tags": Array [],
182           }
183         }
184         currentBranchLike={
185           Object {
186             "analysisDate": "2018-01-01",
187             "excludedFromPurge": true,
188             "isMain": false,
189             "name": "branch-11",
190           }
191         }
192         hasManyBranches={true}
193       />
194     </a>
195   </Toggler>
196 </span>
197 `;