Skip to content

Commit d47fbc6

Browse files
committed
Misc fixes
1 parent f62a1b1 commit d47fbc6

File tree

2 files changed

+46
-31
lines changed

2 files changed

+46
-31
lines changed

__tests__/shared/containers/tc-communities/Page.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jest.setMock(require.resolve('actions/tc-communities/meta'), mockMetaActions);
2020
const mockState = {
2121
tcCommunities: {
2222
meta: {
23+
authorizedGroupIds: ['12345'],
2324
communityId: 'someId',
2425
pageId: 'somePageId',
2526
loading: false,
@@ -35,7 +36,9 @@ const mockState = {
3536
},
3637
},
3738
auth: {
38-
profile: {},
39+
profile: {
40+
groups: [{ id: '12345' }],
41+
},
3942
},
4043
};
4144

@@ -69,7 +72,9 @@ const mockState4 = {
6972
},
7073
},
7174
auth: {
72-
profile: {},
75+
profile: {
76+
groups: [],
77+
},
7378
},
7479
};
7580

__tests__/shared/containers/tc-communities/__snapshots__/Page.jsx.snap

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,14 @@
33
exports[`Matches shapshot 1`] = `
44
<Page
55
activeTrigger={null}
6-
authenticating={false}
7-
challengeFilterTag=""
86
closeMenu={[Function]}
97
closeMobileMenu={[Function]}
108
closeSearch={[Function]}
119
communityId="someId"
12-
cssUrl="some/css/url"
1310
history={Object {}}
14-
isCommunityNotFound={false}
15-
isLoading={false}
1611
isMobileOpen={false}
17-
leaderboardApiUrl={null}
18-
loadData={[Function]}
19-
loadedCommunityId="someId"
12+
loadMetaData={[Function]}
2013
location={Object {}}
21-
logos={
22-
Array [
23-
"some/logo/url",
24-
]
25-
}
2614
match={
2715
Object {
2816
"params": Object {
@@ -31,29 +19,51 @@ exports[`Matches shapshot 1`] = `
3119
},
3220
}
3321
}
34-
menuItems={
35-
Array [
36-
Object {
37-
"title": "Menu Item 1",
38-
"url": "pageId1",
39-
},
40-
Object {
41-
"title": "Menu Item 2",
42-
"url": "pageId2",
43-
},
44-
Object {
45-
"title": "Menu Item 3",
46-
"url": "pageId3",
47-
},
48-
]
22+
meta={
23+
Object {
24+
"authorizedGroupIds": Array [
25+
"12345",
26+
],
27+
"communityId": "someId",
28+
"cssUrl": "some/css/url",
29+
"failed": false,
30+
"isMobileOpen": false,
31+
"loading": false,
32+
"logos": Array [
33+
"some/logo/url",
34+
],
35+
"menuItems": Array [
36+
Object {
37+
"title": "Menu Item 1",
38+
"url": "pageId1",
39+
},
40+
Object {
41+
"title": "Menu Item 2",
42+
"url": "pageId2",
43+
},
44+
Object {
45+
"title": "Menu Item 3",
46+
"url": "pageId3",
47+
},
48+
],
49+
"pageId": "somePageId",
50+
}
4951
}
5052
mobileToggle={[Function]}
5153
openMenu={[Function]}
5254
openMobileMenu={[Function]}
5355
openSearch={[Function]}
5456
openedMenu={null}
5557
pageId="somePageId"
56-
profile={Object {}}
58+
profile={
59+
Object {
60+
"groups": Array [
61+
Object {
62+
"id": "12345",
63+
},
64+
],
65+
}
66+
}
5767
store={
5868
Object {
5969
"dispatch": [Function],

0 commit comments

Comments
 (0)