Skip to content

Commit

Permalink
feature: /members/stats v5 upgade
Browse files Browse the repository at this point in the history
* use v5 /stats and /stats/history
* load memberGroups to speed up site redirection
  • Loading branch information
rakibansary committed Aug 12, 2021
1 parent 51d96a6 commit e713264
Show file tree
Hide file tree
Showing 14 changed files with 4,136 additions and 4,047 deletions.
3 changes: 2 additions & 1 deletion __tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Library interface test 1`] = `
Object {
"actions": Object {
"auth": Object {
"getMemberGroups": [Function],
"loadProfile": [Function],
"setTcTokenV2": [Function],
"setTcTokenV3": [Function],
Expand Down Expand Up @@ -53,7 +54,6 @@ Object {
"dropGroups": [Function],
"getGroupsDone": [Function],
"getGroupsInit": [Function],
"getMemberGroups": [Function],
},
"looker": Object {
"getLookerDone": [Function],
Expand Down Expand Up @@ -404,6 +404,7 @@ Object {
},
"getApiResponsePayload": [Function],
"getLookerApiResponsePayload": [Function],
"handleApiResponse": [Function],
},
"time": Object {
"default": undefined,
Expand Down
5 changes: 4 additions & 1 deletion __tests__/reducers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const photoURL = 'http://url';
const mockActions = {
auth: {
loadProfile: mockAction('LOAD_PROFILE', Promise.resolve('Profile')),
getMemberGroups: mockAction('GET_MEMBER_GROUPS', Promise.resolve(['Group'])),
setTcTokenV2: mockAction('SET_TC_TOKEN_V2', 'Token V2'),
setTcTokenV3: mockAction('SET_TC_TOKEN_V3', 'Token V3'),
},
Expand Down Expand Up @@ -107,6 +108,7 @@ describe('Default reducer', () => {
reducer = reducers.default;
testReducer({
authenticating: true,
memberGroups: [],
profile: null,
tokenV2: '',
tokenV3: '',
Expand All @@ -124,6 +126,7 @@ describe('Factory without server side rendering', () => {

testReducer({
authenticating: true,
memberGroups: [],
profile: null,
tokenV2: '',
tokenV3: '',
Expand All @@ -145,6 +148,6 @@ describe('Factory with server side rendering', () => {
});

testReducer({
authenticating: false, user: 'User object', profile: 'Profile', tokenV2: 'Token V2', tokenV3: 'Token V3',
authenticating: false, user: 'User object', profile: 'Profile', tokenV2: 'Token V2', tokenV3: 'Token V3', memberGroups: ['Group'],
});
});
Loading

0 comments on commit e713264

Please sign in to comment.