Skip to content

Commit 88bde8f

Browse files
authored
Merge pull request #3523 from topcoder-platform/develop
New Navigation v1.0
2 parents b7334ae + 648529b commit 88bde8f

File tree

25 files changed

+640
-1664
lines changed

25 files changed

+640
-1664
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"description": "devxxxxxx",
3+
"email": "[email protected]",
4+
"handle": "huanner",
5+
"photoURL": "https://topcoder-dev-media.s3.amazonaws.com/member/profile/huanner-1552562543506.png"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Default render 1`] = `
4+
<div>
5+
<TopNav
6+
loggedIn={true}
7+
logo={
8+
<Logo
9+
height="20"
10+
viewBox="0 0 54 20"
11+
width="54"
12+
xmlns="http://www.w3.org/2000/svg"
13+
/>
14+
}
15+
menu={
16+
Array [
17+
Object {
18+
"href": "https://www.topcoder-dev.com",
19+
"id": "business",
20+
"title": "BUSINESS",
21+
},
22+
Object {
23+
"id": "community",
24+
"secondaryMenuForGuest": Array [
25+
Object {
26+
"href": "/community/learn",
27+
"title": "Overview",
28+
},
29+
Object {
30+
"href": "/thrive/tracks?track=Topcoder",
31+
"title": "How It Works",
32+
},
33+
],
34+
"secondaryMenuForLoggedInUser": Array [
35+
Object {
36+
"href": "/my-dashboard",
37+
"title": "Dashboard",
38+
},
39+
Object {
40+
"href": "/members/willFilledByUserName",
41+
"id": "myprofile",
42+
"title": "My Profile",
43+
},
44+
Object {
45+
"href": "https://community.topcoder-dev.com/PactsMemberServlet?module=PaymentHistory&full_list=false",
46+
"title": "Payments",
47+
},
48+
],
49+
"subMenu": Array [
50+
Object {
51+
"subMenu": Array [
52+
Object {
53+
"href": "/challenges",
54+
"title": "All Challenges",
55+
},
56+
Object {
57+
"href": "https://arena.topcoder-dev.com",
58+
"title": "Competitive Programming",
59+
},
60+
],
61+
"title": "Compete",
62+
},
63+
Object {
64+
"subMenu": Array [
65+
Object {
66+
"href": "/community/competitive-programming",
67+
"title": "Competitive Programming",
68+
},
69+
Object {
70+
"href": "/community/data-science",
71+
"title": "Data Science",
72+
},
73+
Object {
74+
"href": "/community/design",
75+
"title": "Design",
76+
},
77+
Object {
78+
"href": "/community/development",
79+
"title": "Development",
80+
},
81+
Object {
82+
"href": "/community/qa",
83+
"title": "QA",
84+
},
85+
],
86+
"title": "Tracks",
87+
},
88+
Object {
89+
"subMenu": Array [
90+
Object {
91+
"href": "/community/member-programs/topcoder-open",
92+
"title": "TCO",
93+
},
94+
Object {
95+
"href": "/community/member-programs",
96+
"title": "Programs",
97+
},
98+
Object {
99+
"href": "https://apps.topcoder-dev.com/forums",
100+
"title": "Forums",
101+
},
102+
Object {
103+
"href": "/community/statistics",
104+
"title": "Statistics",
105+
},
106+
Object {
107+
"href": "/community/events",
108+
"title": "Events",
109+
},
110+
Object {
111+
"href": "/blog",
112+
"title": "Blog",
113+
},
114+
Object {
115+
"href": "/thrive",
116+
"title": "Thrive",
117+
},
118+
],
119+
"title": "Explore",
120+
},
121+
],
122+
"title": "COMMUNITY",
123+
},
124+
]
125+
}
126+
onChangeLevel1Id={[Function]}
127+
openMore={true}
128+
profileHandle="huanner"
129+
rightMenu={
130+
<LoginNav
131+
accountMenu={
132+
Array [
133+
Object {
134+
"href": "/settings/profile",
135+
"title": "Settings",
136+
},
137+
Object {
138+
"separator": true,
139+
},
140+
Object {
141+
"href": "https://help.topcoder-dev.com/",
142+
"title": "Help",
143+
},
144+
Object {
145+
"separator": true,
146+
},
147+
Object {
148+
"href": "https://www.topcoder-dev.com/logout",
149+
"title": "Log Out",
150+
},
151+
]
152+
}
153+
authURLs={
154+
Object {
155+
"href": "https://accounts.topcoder-dev.com/member/registration?utm_source=community-app-main",
156+
"location": "https://accounts.topcoder-dev.com/member?retUrl=%S&utm_source=community-app-main",
157+
}
158+
}
159+
loggedIn={true}
160+
notificationButtonState="none"
161+
notifications={Array []}
162+
onMenuOpen={[Function]}
163+
onSwitch={[Function]}
164+
profile={
165+
Object {
166+
"description": "devxxxxxx",
167+
"email": "[email protected]",
168+
"handle": "huanner",
169+
"photoURL": "https://d1aahxkjiobka8.cloudfront.net/avatar/https%3A%2F%2Ftopcoder-dev-media.s3.amazonaws.com%2Fmember%2Fprofile%2Fhuanner-1552562543506.png?size=32",
170+
}
171+
}
172+
showNotification={false}
173+
switchText={
174+
Object {
175+
"href": "https://connect.topcoder-dev.com",
176+
"title": "Switch to BUSINESS",
177+
}
178+
}
179+
/>
180+
}
181+
setOpenMore={[Function]}
182+
theme="light"
183+
/>
184+
</div>
185+
`;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import Renderer from 'react-test-renderer/shallow';
3+
4+
import Header from 'components/Header';
5+
6+
import profileState from './__mocks__/profile-state.json';
7+
8+
9+
const rnd = new Renderer();
10+
11+
it('Default render', () => {
12+
rnd.render((<Header
13+
profile={profileState}
14+
/>));
15+
expect(rnd.getRenderOutput()).toMatchSnapshot();
16+
});

__tests__/shared/components/TopcoderHeader/Auth.jsx

-16
This file was deleted.

__tests__/shared/components/TopcoderHeader/__snapshots__/Auth.jsx.snap

-45
This file was deleted.

0 commit comments

Comments
 (0)