-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #1848 filter app lists when using the marketplace in Developer …
- Loading branch information
1 parent
8d47010
commit 28d03c6
Showing
20 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { RefreshParams, LoginSession } from '@reapit/cognito-auth' | ||
import { COGNITO_GROUP_DEVELOPER_EDITION } from '@/constants/api' | ||
|
||
export const mockLoginSession: LoginSession = { | ||
userName: '[email protected]', | ||
|
@@ -19,6 +20,7 @@ export const mockLoginSession: LoginSession = { | |
userCode: 'SOME_USER_CODE', | ||
isAdmin: false, | ||
userTel: '123', | ||
groups: [COGNITO_GROUP_DEVELOPER_EDITION], | ||
}, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { ReduxState } from '@/types/core' | ||
import { | ||
selectClientId, | ||
selectDeveloperEditionId, | ||
selectLoggedUserEmail, | ||
selectFeaturedApps, | ||
selectWebComponentOpen, | ||
|
@@ -37,6 +38,42 @@ describe('selectClientId', () => { | |
}) | ||
}) | ||
|
||
describe('selectDeveloperEditionId', () => { | ||
it('should run correctly when user in AgencyCloudDeveloperEdition group', () => { | ||
const input = { | ||
auth: { | ||
loginSession: { | ||
loginIdentity: { | ||
clientId: '123', | ||
email: '[email protected]', | ||
developerId: '1234', | ||
groups: ['AgencyCloudDeveloperEdition'], | ||
}, | ||
}, | ||
}, | ||
} as ReduxState | ||
const result = selectDeveloperEditionId(input) | ||
expect(result).toEqual('1234') | ||
}) | ||
|
||
it('should run correctly when user NOT in AgencyCloudDeveloperEdition group', () => { | ||
const input = { | ||
auth: { | ||
loginSession: { | ||
loginIdentity: { | ||
clientId: '123', | ||
email: '[email protected]', | ||
developerId: '1234', | ||
groups: [''], | ||
}, | ||
}, | ||
}, | ||
} as ReduxState | ||
const result = selectDeveloperEditionId(input) | ||
expect(result).toEqual(null) | ||
}) | ||
}) | ||
|
||
describe('selectLoggedUserEmail', () => { | ||
it('should run correctly', () => { | ||
const input = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters