]> source.dussan.org Git - sonarqube.git/blob
171179efbaffa3048b7d3403aee80a554cd0656e
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div
5   className="create-project-import-bbs"
6 >
7   <SearchBox
8     onChange={[MockFunction]}
9     placeholder="onboarding.create_project.search_repositories_by_name"
10   />
11   <BitbucketRepositories
12     disableRepositories={false}
13     onSelectRepository={[MockFunction]}
14     projectRepositories={
15       Object {
16         "project": Object {
17           "allShown": true,
18           "repositories": Array [
19             Object {
20               "id": 1,
21               "name": "Repo",
22               "projectKey": "project",
23               "slug": "project__repo",
24             },
25             Object {
26               "id": 2,
27               "name": "Bar",
28               "projectKey": "project",
29               "slug": "bar",
30               "sqProjectKey": "bar",
31             },
32           ],
33         },
34       }
35     }
36     projects={
37       Array [
38         Object {
39           "id": 1,
40           "key": "project",
41           "name": "Project",
42         },
43         Object {
44           "id": 2,
45           "key": "project2",
46           "name": "Project 2",
47         },
48       ]
49     }
50   />
51 </div>
52 `;
53
54 exports[`should render correctly: no projects 1`] = `
55 <Alert
56   className="spacer-top"
57   variant="warning"
58 >
59   <FormattedMessage
60     defaultMessage="onboarding.create_project.no_bbs_projects"
61     id="onboarding.create_project.no_bbs_projects"
62     values={
63       Object {
64         "link": <Link
65           to={
66             Object {
67               "pathname": "/projects/create",
68               "search": "?mode=bitbucket&resetPat=1",
69             }
70           }
71         >
72           onboarding.create_project.update_your_token
73         </Link>,
74       }
75     }
76   />
77 </Alert>
78 `;
79
80 exports[`should render correctly: search results 1`] = `
81 <div
82   className="create-project-import-bbs"
83 >
84   <SearchBox
85     onChange={[MockFunction]}
86     placeholder="onboarding.create_project.search_repositories_by_name"
87   />
88   <BitbucketSearchResults
89     disableRepositories={false}
90     onSelectRepository={[MockFunction]}
91     projects={
92       Array [
93         Object {
94           "id": 1,
95           "key": "project",
96           "name": "Project",
97         },
98         Object {
99           "id": 2,
100           "key": "project2",
101           "name": "Project 2",
102         },
103       ]
104     }
105     searchResults={
106       Array [
107         Object {
108           "id": 1,
109           "name": "Repo",
110           "projectKey": "project",
111           "slug": "project__repo",
112         },
113       ]
114     }
115     searching={false}
116   />
117 </div>
118 `;
119
120 exports[`should render correctly: searching 1`] = `
121 <div
122   className="create-project-import-bbs"
123 >
124   <SearchBox
125     onChange={[MockFunction]}
126     placeholder="onboarding.create_project.search_repositories_by_name"
127   />
128   <BitbucketSearchResults
129     disableRepositories={false}
130     onSelectRepository={[MockFunction]}
131     projects={
132       Array [
133         Object {
134           "id": 1,
135           "key": "project",
136           "name": "Project",
137         },
138         Object {
139           "id": 2,
140           "key": "project2",
141           "name": "Project 2",
142         },
143       ]
144     }
145     searching={true}
146   />
147 </div>
148 `;