diff --git a/src/api/SpaceAndProjectApi.js b/src/api/SpaceAndProjectApi.js index fbf6191..a0f07b8 100755 --- a/src/api/SpaceAndProjectApi.js +++ b/src/api/SpaceAndProjectApi.js @@ -279,6 +279,7 @@ class SpaceAndProjectApi { * - height * - dataSetID * - dataObject + * - region * * @param {String} projectID to run test from * @param {Object} testParams containing the parameters listed above @@ -292,6 +293,7 @@ class SpaceAndProjectApi { let dataSetID = testParams.dataSetID || testParams.environmentId; let dataObject = testParams.data || testParams.dataObject; let secretData = testParams.secretData; + let region = testParams.region || null; // Lets prepare the request object let reqObj = { @@ -305,6 +307,9 @@ class SpaceAndProjectApi { if( testParams.userAgent != null && testParams.userAgent.length >= 1 ) { reqObj.userAgent = testParams.userAgent; } + if( region != null ) { + reqObj.region = region; + } if( dataSetID != null ) { reqObj["environmentId"] = dataSetID; } else { diff --git a/src/cli-command/project/run.js b/src/cli-command/project/run.js index 69349f1..2e1e926 100644 --- a/src/cli-command/project/run.js +++ b/src/cli-command/project/run.js @@ -344,9 +344,8 @@ class TestRunnerSession { browser: this.browser, width: this.width, height: this.height, - // We set both region, and serverRegion for backwards compatibility reasons + // We ensure region is forwarded region: this.region, - serverRegion: this.region, // Rest is as per normal dataSetID: this.dataSetID, data: this.dataObject,