@@ -17,6 +17,7 @@ describe('Region command', function () {
1717 developerHubUrl : 'https://developerhub-api.contentstack.com' ,
1818 launchHubUrl : 'https://launch-api.contentstack.com' ,
1919 personalizeUrl : 'https://personalization-api.contentstack.com' ,
20+ composableStudioUrl : 'https://composable-studio-api.contentstack.com' ,
2021 } ;
2122 let cliuxPrintStub : sinon . SinonStub ;
2223 let configGetStub : sinon . SinonStub ;
@@ -69,6 +70,7 @@ describe('Region command', function () {
6970 expect ( result . developerHubUrl ) . to . equal ( 'https://developerhub-api.contentstack.com' ) ;
7071 expect ( result . personalizeUrl ) . to . equal ( 'https://personalize-api.contentstack.com' ) ;
7172 expect ( result . launchHubUrl ) . to . equal ( 'https://launch-api.contentstack.com' ) ;
73+ expect ( result . composableStudioUrl ) . to . equal ( 'https://composable-studio-api.contentstack.com' ) ;
7274 } ) ;
7375
7476 it ( 'should set EU region' , function ( ) {
@@ -80,6 +82,7 @@ describe('Region command', function () {
8082 expect ( result . developerHubUrl ) . to . equal ( 'https://eu-developerhub-api.contentstack.com' ) ;
8183 expect ( result . personalizeUrl ) . to . equal ( 'https://eu-personalize-api.contentstack.com' ) ;
8284 expect ( result . launchHubUrl ) . to . equal ( 'https://eu-launch-api.contentstack.com' ) ;
85+ expect ( result . composableStudioUrl ) . to . equal ( 'https://eu-composable-studio-api.contentstack.com' ) ;
8386 } ) ;
8487
8588 it ( 'should set AU region' , function ( ) {
@@ -91,6 +94,7 @@ describe('Region command', function () {
9194 expect ( result . developerHubUrl ) . to . equal ( 'https://au-developerhub-api.contentstack.com' ) ;
9295 expect ( result . personalizeUrl ) . to . equal ( 'https://au-personalize-api.contentstack.com' ) ;
9396 expect ( result . launchHubUrl ) . to . equal ( 'https://au-launch-api.contentstack.com' ) ;
97+ expect ( result . composableStudioUrl ) . to . equal ( 'https://au-composable-studio-api.contentstack.com' ) ;
9498 } ) ;
9599
96100 it ( 'should set AWS-NA region' , function ( ) {
@@ -102,6 +106,7 @@ describe('Region command', function () {
102106 expect ( result . developerHubUrl ) . to . equal ( 'https://developerhub-api.contentstack.com' ) ;
103107 expect ( result . personalizeUrl ) . to . equal ( 'https://personalize-api.contentstack.com' ) ;
104108 expect ( result . launchHubUrl ) . to . equal ( 'https://launch-api.contentstack.com' ) ;
109+ expect ( result . composableStudioUrl ) . to . equal ( 'https://composable-studio-api.contentstack.com' ) ;
105110 } ) ;
106111
107112 it ( 'should set AWS-EU region' , function ( ) {
@@ -113,6 +118,7 @@ describe('Region command', function () {
113118 expect ( result . developerHubUrl ) . to . equal ( 'https://eu-developerhub-api.contentstack.com' ) ;
114119 expect ( result . personalizeUrl ) . to . equal ( 'https://eu-personalize-api.contentstack.com' ) ;
115120 expect ( result . launchHubUrl ) . to . equal ( 'https://eu-launch-api.contentstack.com' ) ;
121+ expect ( result . composableStudioUrl ) . to . equal ( 'https://eu-composable-studio-api.contentstack.com' ) ;
116122 } ) ;
117123
118124 it ( 'should set AWS-AU region' , function ( ) {
@@ -124,6 +130,7 @@ describe('Region command', function () {
124130 expect ( result . developerHubUrl ) . to . equal ( 'https://au-developerhub-api.contentstack.com' ) ;
125131 expect ( result . personalizeUrl ) . to . equal ( 'https://au-personalize-api.contentstack.com' ) ;
126132 expect ( result . launchHubUrl ) . to . equal ( 'https://au-launch-api.contentstack.com' ) ;
133+ expect ( result . composableStudioUrl ) . to . equal ( 'https://au-composable-studio-api.contentstack.com' ) ;
127134 } ) ;
128135
129136 it ( 'should set AZURE-NA region' , function ( ) {
@@ -135,6 +142,7 @@ describe('Region command', function () {
135142 expect ( result . developerHubUrl ) . to . equal ( 'https://azure-na-developerhub-api.contentstack.com' ) ;
136143 expect ( result . personalizeUrl ) . to . equal ( 'https://azure-na-personalize-api.contentstack.com' ) ;
137144 expect ( result . launchHubUrl ) . to . equal ( 'https://azure-na-launch-api.contentstack.com' ) ;
145+ expect ( result . composableStudioUrl ) . to . equal ( 'https://azure-na-composable-studio-api.contentstack.com' ) ;
138146 } ) ;
139147
140148 it ( 'should set AZURE-EU region' , function ( ) {
@@ -146,6 +154,7 @@ describe('Region command', function () {
146154 expect ( result . developerHubUrl ) . to . equal ( 'https://azure-eu-developerhub-api.contentstack.com' ) ;
147155 expect ( result . personalizeUrl ) . to . equal ( 'https://azure-eu-personalize-api.contentstack.com' ) ;
148156 expect ( result . launchHubUrl ) . to . equal ( 'https://azure-eu-launch-api.contentstack.com' ) ;
157+ expect ( result . composableStudioUrl ) . to . equal ( 'https://azure-eu-composable-studio-api.contentstack.com' ) ;
149158 } ) ;
150159
151160 it ( 'should set GCP-NA region' , function ( ) {
@@ -157,6 +166,7 @@ describe('Region command', function () {
157166 expect ( result . developerHubUrl ) . to . equal ( 'https://gcp-na-developerhub-api.contentstack.com' ) ;
158167 expect ( result . personalizeUrl ) . to . equal ( 'https://gcp-na-personalize-api.contentstack.com' ) ;
159168 expect ( result . launchHubUrl ) . to . equal ( 'https://gcp-na-launch-api.contentstack.com' ) ;
169+ expect ( result . composableStudioUrl ) . to . equal ( 'https://gcp-na-composable-studio-api.contentstack.com' ) ;
160170 } ) ;
161171
162172 it ( 'should set GCP-EU region' , function ( ) {
@@ -168,6 +178,7 @@ describe('Region command', function () {
168178 expect ( result . developerHubUrl ) . to . equal ( 'https://gcp-eu-developerhub-api.contentstack.com' ) ;
169179 expect ( result . personalizeUrl ) . to . equal ( 'https://gcp-eu-personalize-api.contentstack.com' ) ;
170180 expect ( result . launchHubUrl ) . to . equal ( 'https://gcp-eu-launch-api.contentstack.com' ) ;
181+ expect ( result . composableStudioUrl ) . to . equal ( 'https://gcp-eu-composable-studio-api.contentstack.com' ) ;
171182 } ) ;
172183
173184 it ( 'should return undefined for invalid region' , function ( ) {
@@ -263,6 +274,18 @@ describe('Region command', function () {
263274 expect ( result . launchHubUrl ) . to . equal ( customRegion . launchHubUrl ) ;
264275 } ) ;
265276
277+ it ( 'should set a custom region with composable studio URL' , function ( ) {
278+ const customRegion = {
279+ cma : 'https://custom-cma.com' ,
280+ cda : 'https://custom-cda.com' ,
281+ uiHost : 'https://custom-ui.com' ,
282+ name : 'Custom Region' ,
283+ composableStudioUrl : 'https://custom-composable-studio.com' ,
284+ } ;
285+ const result = UserConfig . setCustomRegion ( customRegion ) ;
286+ expect ( result . composableStudioUrl ) . to . equal ( customRegion . composableStudioUrl ) ;
287+ } ) ;
288+
266289 it ( 'should set a custom region with all optional URLs' , function ( ) {
267290 const customRegion = {
268291 cma : 'https://custom-cma.com' ,
@@ -272,6 +295,7 @@ describe('Region command', function () {
272295 developerHubUrl : 'https://custom-developer-hub.com' ,
273296 personalizeUrl : 'https://custom-personalize.com' ,
274297 launchHubUrl : 'https://custom-launch.com' ,
298+ composableStudioUrl : 'https://custom-composable-studio.com' ,
275299 } ;
276300 const result = UserConfig . setCustomRegion ( customRegion ) ;
277301 expect ( result ) . to . deep . equal ( customRegion ) ;
@@ -286,6 +310,7 @@ describe('Region command', function () {
286310 developerHubUrl : 'https://custom-developer-hub.com' ,
287311 personalizeUrl : 'https://custom-personalize.com' ,
288312 launchHubUrl : 'https://custom-launch.com' ,
313+ composableStudioUrl : 'https://custom-composable-studio.com' ,
289314 invalidProperty : 'should be removed' ,
290315 } ;
291316 const result = UserConfig . setCustomRegion ( customRegion ) ;
0 commit comments