File tree Expand file tree Collapse file tree 3 files changed +31
-5
lines changed
Expand file tree Collapse file tree 3 files changed +31
-5
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,20 @@ var BringgSDK = (function () {
2020
2121 var REGIONS = {
2222 "ew1" : "https://eu1-realtime.bringg.com/" ,
23- "ue1" : "https://realtime2-api .bringg.com/" ,
23+ "ue1" : "https://realtime .bringg.com/" ,
2424 "ew1g" : "https://eu2-realtime.bringg.com/" ,
25- "ue4g" : "https://us2-realtime.bringg.com/"
25+ "ue4g" : "https://us2-realtime.bringg.com/" ,
26+ "ew3g" : "https://eu3-realtime.bringg.com/" ,
27+ "uc1g" : "https://us3-realtime.bringg.com/" ,
2628 } ;
2729
2830 var REGIONS_ENUM = {
2931 'ew1' : 1 ,
3032 'ue1' : 2 ,
3133 'ew1g' : 5 ,
32- 'ue4g' : 6
34+ 'ue4g' : 6 ,
35+ 'ew3g' : 7 ,
36+ 'uc1g' : 8
3337 } ;
3438
3539 var REAL_TIME_PRODUCTION = REGIONS [ "ue1" ] ;
@@ -400,6 +404,24 @@ var BringgSDK = (function () {
400404 }
401405 } ;
402406
407+ module . resetAllCallbacks = function ( ) {
408+ callbacks = {
409+ onConnectCb : null ,
410+ onDisconnectCb : null ,
411+ orderUpdateCb : null ,
412+ locationUpdateCb : null ,
413+ etaUpdateCb : null ,
414+ etaMethodChangedCb : null ,
415+ driverArrivedCb : null ,
416+ driverLeftCb : null ,
417+ taskEndedCb : null ,
418+ taskRatedCb : null ,
419+ failedLoadingCb : null ,
420+ noteAddedCb : null ,
421+ taskPostRatedCb : null
422+ }
423+ } ;
424+
403425 module . submitRating = function ( rating ) {
404426 if ( configuration ) {
405427 if ( configuration . rating_url && configuration . rating_token ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ beforeEach(function () {
99} ) ;
1010
1111describe ( "BringgSDK" , function ( ) {
12+ afterEach ( function ( ) {
13+ BringgSDK . resetAllCallbacks ( ) ;
14+ } )
15+
1216 it ( "check the API of the service" , function ( ) {
1317 expect ( BringgSDK . _socket ) . toBeNull ( ) ;
1418 expect ( BringgSDK . initializeBringg ) . toBeDefined ( ) ;
@@ -147,7 +151,7 @@ describe("BringgSDK", function () {
147151 } ) ;
148152
149153 it ( "takes region from prefix" , function ( ) {
150- var ue1Endpoint = "https://realtime2-api .bringg.com/" ;
154+ var ue1Endpoint = "https://realtime .bringg.com/" ;
151155 var ew1Endpoint = "https://eu1-realtime.bringg.com/" ;
152156 var ew1gEndpoint = "https://eu2-realtime.bringg.com/" ;
153157 var ue4gEndpoint = "https://us2-realtime.bringg.com/" ;
Original file line number Diff line number Diff line change 11{
22 "name" : " customer-sdk" ,
3- "version" : " 1.1 .0" ,
3+ "version" : " 1.2 .0" ,
44 "scripts" : {
55 "test" : " karma start" ,
66 "codecov" : " codecov"
You can’t perform that action at this time.
0 commit comments