]> source.dussan.org Git - sonarqube.git/blob
9cfa749b9f646827e3386ce19c59eaf3e690614f
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div>
5   <AzureProjectAccordion
6     importing={false}
7     key="azure-project-1"
8     loading={false}
9     onOpen={[MockFunction]}
10     onSelectRepository={[MockFunction]}
11     project={
12       Object {
13         "description": "Azure Project",
14         "name": "azure-project-1",
15       }
16     }
17     repositories={Array []}
18     startsOpen={true}
19   />
20   <ListFooter
21     count={1}
22     loadMore={[Function]}
23     total={1}
24   />
25 </div>
26 `;
27
28 exports[`should render correctly: empty 1`] = `
29 <Alert
30   className="spacer-top"
31   variant="warning"
32 >
33   <FormattedMessage
34     defaultMessage="onboarding.create_project.azure.no_projects"
35     id="onboarding.create_project.azure.no_projects"
36     values={
37       Object {
38         "link": <Link
39           to={
40             Object {
41               "pathname": "/projects/create",
42               "search": "?mode=azure&resetPat=1",
43             }
44           }
45         >
46           onboarding.create_project.update_your_token
47         </Link>,
48       }
49     }
50   />
51 </Alert>
52 `;
53
54 exports[`should render search results correctly: default 1`] = `
55 <div>
56   <AzureProjectAccordion
57     importing={false}
58     key="p2 - result"
59     loading={false}
60     onOpen={[MockFunction]}
61     onSelectRepository={[MockFunction]}
62     project={
63       Object {
64         "description": "p2",
65         "name": "p2",
66       }
67     }
68     repositories={
69       Array [
70         Object {
71           "name": "Azure repo 1",
72           "projectName": "p2",
73         },
74       ]
75     }
76     startsOpen={true}
77   />
78   <ListFooter
79     count={1}
80     loadMore={[Function]}
81     total={1}
82   />
83 </div>
84 `;
85
86 exports[`should render search results correctly: empty 1`] = `
87 <Alert
88   className="spacer-top"
89   variant="warning"
90 >
91   onboarding.create_project.azure.no_results
92 </Alert>
93 `;
94
95 exports[`should render search results correctly: search results belonging to unknown projects 1`] = `
96 <div>
97   <AzureProjectAccordion
98     importing={false}
99     key="p2 - result"
100     loading={false}
101     onOpen={[MockFunction]}
102     onSelectRepository={[MockFunction]}
103     project={
104       Object {
105         "description": "p2",
106         "name": "p2",
107       }
108     }
109     repositories={
110       Array [
111         Object {
112           "name": "Azure repo 1",
113           "projectName": "p2",
114         },
115       ]
116     }
117     startsOpen={true}
118   />
119   <AzureProjectAccordion
120     importing={false}
121     key="u1 - result"
122     loading={false}
123     onOpen={[MockFunction]}
124     onSelectRepository={[MockFunction]}
125     project={
126       Object {
127         "description": "onboarding.create_project.azure.search_results_for_project_X.u1",
128         "name": "u1",
129       }
130     }
131     repositories={
132       Array [
133         Object {
134           "name": "Unknown repository 1",
135           "projectName": "u1",
136         },
137       ]
138     }
139     startsOpen={true}
140   />
141   <AzureProjectAccordion
142     importing={false}
143     key="u2 - result"
144     loading={false}
145     onOpen={[MockFunction]}
146     onSelectRepository={[MockFunction]}
147     project={
148       Object {
149         "description": "onboarding.create_project.azure.search_results_for_project_X.u2",
150         "name": "u2",
151       }
152     }
153     repositories={
154       Array [
155         Object {
156           "name": "Unknown repository 2",
157           "projectName": "u2",
158         },
159       ]
160     }
161     startsOpen={true}
162   />
163   <ListFooter
164     count={3}
165     loadMore={[Function]}
166     total={3}
167   />
168 </div>
169 `;