-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into test/KIT-3578
- Loading branch information
Showing
21 changed files
with
200 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "ES2023", "ESNext.Collection"], | ||
"moduleResolution": "Bundler", | ||
"module": "ES2022", | ||
"target": "ES2021", | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": false, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"jsx": "react", | ||
"jsxFactory": "h" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.storybook.json" | ||
} | ||
], | ||
"include": ["src", "types/jsx.d.ts"], | ||
"extends": "./tsconfig.stencil.json", | ||
"exclude": [ | ||
"node_modules", | ||
"src/external-builds", | ||
"**/*.stories.tsx", | ||
"**/*.stories.ts", | ||
"**/*.stories.js", | ||
"**/e2e/**/*" | ||
"**/*.stories.js" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "ES2023", "ESNext.Collection"], | ||
"moduleResolution": "Bundler", | ||
"module": "ES2022", | ||
"target": "ES2021", | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": false, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"jsx": "react", | ||
"jsxFactory": "h" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.storybook.json" | ||
} | ||
], | ||
"include": ["src", "types/jsx.d.ts"], | ||
"exclude": [ | ||
"node_modules", | ||
"src/external-builds", | ||
"**/*.stories.tsx", | ||
"**/*.stories.ts", | ||
"**/*.stories.js", | ||
"**/e2e/**/*" | ||
] | ||
} |
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
55 changes: 55 additions & 0 deletions
55
packages/quantic/force-app/main/default/classes/OrganizationEndpointsTest.cls
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@isTest | ||
public class OrganizationEndpointsTest { | ||
@isTest | ||
static void testGetOrganizationEndpointsWithProdEnv() { | ||
String orgId = 'testOrgId'; | ||
String env = 'prod'; | ||
|
||
Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId, env); | ||
|
||
String expectedPlatform = 'https://testOrgId.org.coveo.com'; | ||
String expectedAnalytics = 'https://testOrgIdanalytics.org.coveo.com'; | ||
String expectedSearch = expectedPlatform + '/rest/search/v2'; | ||
String expectedAdmin = 'https://testOrgIdadmin.org.coveo.com'; | ||
|
||
System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch for prod'); | ||
System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch for prod'); | ||
System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch for prod'); | ||
System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch for prod'); | ||
} | ||
|
||
@isTest | ||
static void testGetOrganizationEndpointsWithNonProdEnv() { | ||
String orgId = 'testOrgId'; | ||
String env = 'dev'; | ||
|
||
Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId, env); | ||
|
||
String expectedPlatform = 'https://testOrgId.orgdev.coveo.com'; | ||
String expectedAnalytics = 'https://testOrgIdanalytics.orgdev.coveo.com'; | ||
String expectedSearch = expectedPlatform + '/rest/search/v2'; | ||
String expectedAdmin = 'https://testOrgIdadmin.orgdev.coveo.com'; | ||
|
||
System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch for dev'); | ||
System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch for dev'); | ||
System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch for dev'); | ||
System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch for dev'); | ||
} | ||
|
||
@isTest | ||
static void testGetOrganizationEndpointsWithoutEnv() { | ||
String orgId = 'testOrgId'; | ||
|
||
Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId); | ||
|
||
String expectedPlatform = 'https://testOrgId.org.coveo.com'; | ||
String expectedAnalytics = 'https://testOrgIdanalytics.org.coveo.com'; | ||
String expectedSearch = expectedPlatform + '/rest/search/v2'; | ||
String expectedAdmin = 'https://testOrgIdadmin.org.coveo.com'; | ||
|
||
System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch'); | ||
System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch'); | ||
System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch'); | ||
System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch'); | ||
} | ||
} |
Oops, something went wrong.