@@ -27,6 +27,7 @@ export interface EspressoCapabilities {
2727 phoneOnly ?: boolean ;
2828 name ?: string ;
2929 build ?: string ;
30+ 'testingbot.geoCountryCode' ?: string ;
3031}
3132
3233export interface EspressoRunOptions {
@@ -42,8 +43,6 @@ export interface EspressoRunOptions {
4243 language ?: string ;
4344 locale ?: string ;
4445 timeZone ?: string ;
45- // Geolocation
46- geoLocation ?: string ;
4746 // Network throttling
4847 throttle_network ?: ThrottleNetwork | CustomNetworkProfile ;
4948}
@@ -72,7 +71,7 @@ export default class EspressoOptions {
7271 private _locale ?: string ;
7372 private _timeZone ?: string ;
7473 // Geolocation
75- private _geoLocation ?: string ;
74+ private _geoCountryCode ?: string ;
7675 // Network throttling
7776 private _throttleNetwork ?: ThrottleNetwork | CustomNetworkProfile ;
7877 // Execution mode
@@ -106,7 +105,7 @@ export default class EspressoOptions {
106105 language ?: string ;
107106 locale ?: string ;
108107 timeZone ?: string ;
109- geoLocation ?: string ;
108+ geoCountryCode ?: string ;
110109 throttleNetwork ?: ThrottleNetwork | CustomNetworkProfile ;
111110 quiet ?: boolean ;
112111 async ?: boolean ;
@@ -144,7 +143,7 @@ export default class EspressoOptions {
144143 this . _language = options ?. language ;
145144 this . _locale = options ?. locale ;
146145 this . _timeZone = options ?. timeZone ;
147- this . _geoLocation = options ?. geoLocation ;
146+ this . _geoCountryCode = options ?. geoCountryCode ;
148147 this . _throttleNetwork = options ?. throttleNetwork ;
149148 this . _quiet = options ?. quiet ?? false ;
150149 this . _async = options ?. async ?? false ;
@@ -234,8 +233,8 @@ export default class EspressoOptions {
234233 return this . _timeZone ;
235234 }
236235
237- public get geoLocation ( ) : string | undefined {
238- return this . _geoLocation ;
236+ public get geoCountryCode ( ) : string | undefined {
237+ return this . _geoCountryCode ;
239238 }
240239
241240 public get throttleNetwork ( ) :
@@ -281,6 +280,8 @@ export default class EspressoOptions {
281280 if ( this . _phoneOnly ) caps . phoneOnly = true ;
282281 if ( this . _name ) caps . name = this . _name ;
283282 if ( this . _build ) caps . build = this . _build ;
283+ if ( this . _geoCountryCode )
284+ caps [ 'testingbot.geoCountryCode' ] = this . _geoCountryCode ;
284285
285286 return caps ;
286287 }
@@ -304,8 +305,6 @@ export default class EspressoOptions {
304305 if ( this . _language ) opts . language = this . _language ;
305306 if ( this . _locale ) opts . locale = this . _locale ;
306307 if ( this . _timeZone ) opts . timeZone = this . _timeZone ;
307- // Geolocation
308- if ( this . _geoLocation ) opts . geoLocation = this . _geoLocation ;
309308 // Network throttling
310309 if ( this . _throttleNetwork ) opts . throttle_network = this . _throttleNetwork ;
311310
0 commit comments