@@ -549,8 +549,12 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
549549 )
550550 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , SERVER_INFO )
551551 . post ( utils . PORTAL_SUBSET . restUrl + "/content/users/casey/aabb123456/createService" , mockItems . get400Failure ( ) )
552- . post (
553- "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/findTransformations" ,
552+ . get (
553+ "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/findTransformations?f=json&inSR=102100&outSR=-1&extentOfInterest=%7B%22xmin%22%3A-9821384.714217981%2C%22ymin%22%3A5117339.123090005%2C%22xmax%22%3A-9797228.384715842%2C%22ymax%22%3A5137789.39951188%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D" ,
554+ mockItems . get400Failure ( ) ,
555+ )
556+ . get (
557+ "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/findTransformations?f=json&inSR=4326&outSR=-1&extentOfInterest=%7B%22xmin%22%3A-179%2C%22xmax%22%3A179%2C%22ymin%22%3A-89%2C%22ymax%22%3A89%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" ,
554558 mockItems . get400Failure ( ) ,
555559 ) ;
556560
@@ -1510,18 +1514,18 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
15101514 utils . getPortalsSelfResponse ( ) ,
15111515 )
15121516 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1513- . post ( geometryServiceUrl + "/findTransformations" , {
1517+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , {
15141518 transformations : [
15151519 {
15161520 wkid : 3 ,
15171521 } ,
15181522 ] ,
15191523 } )
1520- . post ( geometryServiceUrl + "/project" , {
1524+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D&transformation=3 " , {
15211525 geometries : projectedGeometries ,
15221526 } )
1523- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1524- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1527+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1528+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
15251529
15261530 const _extent = await restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ;
15271531 expect ( _extent ) . toEqual ( expectedExtent ) ;
@@ -1534,18 +1538,18 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
15341538 utils . getPortalsSelfResponse ( ) ,
15351539 )
15361540 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1537- . post ( geometryServiceUrl + "/findTransformations" , {
1541+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , {
15381542 transformations : [
15391543 {
15401544 geoTransforms : 3 ,
15411545 } ,
15421546 ] ,
15431547 } )
1544- . post ( geometryServiceUrl + "/project" , {
1548+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D&transformation=%7B%22geoTransforms%22%3A3%7D " , {
15451549 geometries : projectedGeometries ,
15461550 } )
1547- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1548- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1551+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1552+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
15491553
15501554 const _extent = await restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ;
15511555 expect ( _extent ) . toEqual ( expectedExtent ) ;
@@ -1558,12 +1562,12 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
15581562 utils . getPortalsSelfResponse ( ) ,
15591563 )
15601564 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1561- . post ( geometryServiceUrl + "/findTransformations" , { } )
1562- . post ( geometryServiceUrl + "/project" , {
1565+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , { } )
1566+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D " , {
15631567 geometries : projectedGeometries ,
15641568 } )
1565- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1566- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1569+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1570+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
15671571
15681572 const _extent = await restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ;
15691573 expect ( _extent ) . toEqual ( expectedExtent ) ;
@@ -1576,14 +1580,14 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
15761580 utils . getPortalsSelfResponse ( ) ,
15771581 )
15781582 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1579- . post ( geometryServiceUrl + "/findTransformations" , {
1583+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , {
15801584 transformations : [ { } ] ,
15811585 } )
1582- . post ( geometryServiceUrl + "/project" , {
1586+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D " , {
15831587 geometries : projectedGeometries ,
15841588 } )
1585- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1586- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1589+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1590+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
15871591
15881592 const _extent = await restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ;
15891593 expect ( _extent ) . toEqual ( expectedExtent ) ;
@@ -1596,18 +1600,18 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
15961600 utils . getPortalsSelfResponse ( ) ,
15971601 )
15981602 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1599- . post ( geometryServiceUrl + "/findTransformations" , {
1603+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , {
16001604 transformations : [
16011605 {
16021606 wkid : 3 ,
16031607 } ,
16041608 ] ,
16051609 } )
1606- . post ( geometryServiceUrl + "/project" , {
1610+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D&transformation=3 " , {
16071611 geometries : [ ] ,
16081612 } )
1609- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1610- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1613+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1614+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
16111615
16121616 const expected : any = undefined ;
16131617
@@ -1622,16 +1626,17 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
16221626 utils . getPortalsSelfResponse ( ) ,
16231627 )
16241628 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1625- . post ( geometryServiceUrl + "/findTransformations" , {
1629+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D " , {
16261630 transformations : [
16271631 {
16281632 wkid : 3 ,
16291633 } ,
16301634 ] ,
16311635 } )
1632- . post ( geometryServiceUrl + "/project" , mockItems . get400Failure ( ) )
1633- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1634- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1636+ . get ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=1&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-131%2C%22y%22%3A16%7D%2C%7B%22x%22%3A-57%2C%22y%22%3A58%7D%5D%7D&transformation=3" ,
1637+ mockItems . get400Failure ( ) )
1638+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1639+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
16351640
16361641 await expectAsync (
16371642 restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ,
@@ -1645,9 +1650,10 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
16451650 utils . getPortalsSelfResponse ( ) ,
16461651 )
16471652 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
1648- . post ( geometryServiceUrl + "/findTransformations" , mockItems . get400Failure ( ) )
1649- . post ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1650- . post ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
1653+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=1&outSR=2&extentOfInterest=%7B%22xmin%22%3A-131%2C%22ymin%22%3A16%2C%22xmax%22%3A-57%2C%22ymax%22%3A58%2C%22spatialReference%22%3A%7B%22wkid%22%3A1%7D%7D" ,
1654+ mockItems . get400Failure ( ) )
1655+ . get ( geometryServiceUrl + "/findTransformations/rest/info" , "{}" )
1656+ . get ( geometryServiceUrl + "/project/rest/info" , "{}" ) ;
16511657
16521658 await expectAsync (
16531659 restHelpers . convertExtent ( extent , serviceSR , geometryServiceUrl , MOCK_USER_SESSION ) ,
@@ -1685,16 +1691,17 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
16851691 utils . getPortalsSelfResponse ( ) ,
16861692 )
16871693 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , SERVER_INFO )
1688- . post ( geometryServiceUrl + "/findTransformations" , { } )
1689- . postOnce (
1690- geometryServiceUrl + "/project" ,
1694+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmax%22%3A180%2C%22xmin%22%3A-180%2C%22ymax%22%3A90%2C%22ymin%22%3A-90%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1695+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmin%22%3A-179%2C%22xmax%22%3A179%2C%22ymin%22%3A-89%2C%22ymax%22%3A89%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1696+ . getOnce (
1697+ geometryServiceUrl + "/project?f=json&outSR=2&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-180%2C%22y%22%3A-90%7D%2C%7B%22x%22%3A180%2C%22y%22%3A90%7D%5D%7D" ,
16911698 {
16921699 geometries : NaNGeoms ,
16931700 } ,
16941701 { overwriteRoutes : false } ,
16951702 )
1696- . postOnce (
1697- geometryServiceUrl + "/project" ,
1703+ . getOnce (
1704+ geometryServiceUrl + "/project?f=json&outSR=2&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-179%2C%22y%22%3A-89%7D%2C%7B%22x%22%3A179%2C%22y%22%3A89%7D%5D%7D " ,
16981705 {
16991706 geometries : projectedGeometries ,
17001707 } ,
@@ -1740,9 +1747,10 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
17401747 utils . getPortalsSelfResponse ( ) ,
17411748 )
17421749 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , SERVER_INFO )
1743- . post ( geometryServiceUrl + "/findTransformations" , { } )
1744- . postOnce (
1745- geometryServiceUrl + "/project" ,
1750+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmax%22%3A180%2C%22xmin%22%3A-180%2C%22ymax%22%3A90%2C%22ymin%22%3A-90%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1751+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmin%22%3A-179%2C%22xmax%22%3A179%2C%22ymin%22%3A-89%2C%22ymax%22%3A89%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1752+ . getOnce (
1753+ geometryServiceUrl + "/project?f=json&outSR=2&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-180%2C%22y%22%3A-90%7D%2C%7B%22x%22%3A180%2C%22y%22%3A90%7D%5D%7D" ,
17461754 {
17471755 geometries : NaNGeoms ,
17481756 } ,
@@ -1787,15 +1795,17 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
17871795 utils . getPortalsSelfResponse ( ) ,
17881796 )
17891797 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , SERVER_INFO )
1790- . post ( geometryServiceUrl + "/findTransformations" , { } )
1791- . postOnce (
1792- geometryServiceUrl + "/project" ,
1798+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmax%22%3A180%2C%22xmin%22%3A-180%2C%22ymax%22%3A90%2C%22ymin%22%3A-90%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1799+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=2&extentOfInterest=%7B%22xmin%22%3A-179%2C%22xmax%22%3A179%2C%22ymin%22%3A-89%2C%22ymax%22%3A89%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , { } )
1800+ . getOnce (
1801+ geometryServiceUrl + "/project?f=json&outSR=2&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-180%2C%22y%22%3A-90%7D%2C%7B%22x%22%3A180%2C%22y%22%3A90%7D%5D%7D" ,
17931802 {
17941803 geometries : NaNGeoms ,
17951804 } ,
17961805 { overwriteRoutes : false } ,
17971806 )
1798- . postOnce ( geometryServiceUrl + "/project" , mockItems . get400Failure ( ) , {
1807+ . getOnce ( geometryServiceUrl + "/project?f=json&outSR=2&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A-179%2C%22y%22%3A-89%7D%2C%7B%22x%22%3A179%2C%22y%22%3A89%7D%5D%7D" ,
1808+ mockItems . get400Failure ( ) , {
17991809 overwriteRoutes : false ,
18001810 } ) ;
18011811
@@ -3733,7 +3743,7 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
37333743 wkid : 102100 ,
37343744 } ;
37353745
3736- fetchMock . post ( geometryServiceUrl + "/findTransformations" , "{}" ) ;
3746+ fetchMock . get ( geometryServiceUrl + "/findTransformations" , "{}" ) ;
37373747
37383748 const options = await restHelpers . _getCreateServiceOptions ( itemTemplate , userSession , templateDictionary ) ;
37393749 expect ( options ) . toEqual ( {
@@ -3799,7 +3809,7 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
37993809 solutionItemExtent : solutionItemExtent ,
38003810 } ;
38013811
3802- fetchMock . post (
3812+ fetchMock . get (
38033813 "http://utility/geomServer/findTransformations/rest/info" ,
38043814 '{"error":{"code":403,"message":"Access not allowed request","details":[]}}' ,
38053815 ) ;
@@ -3877,7 +3887,7 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
38773887 } ,
38783888 } ;
38793889
3880- fetchMock . post (
3890+ fetchMock . get (
38813891 "http://utility/geomServer/findTransformations/rest/info" ,
38823892 '{"error":{"code":403,"message":"Access not allowed request","details":[]}}' ,
38833893 ) ;
@@ -3946,7 +3956,7 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
39463956 solutionItemExtent : solutionItemExtent ,
39473957 } ;
39483958
3949- fetchMock . post (
3959+ fetchMock . get (
39503960 "http://utility/geomServer/findTransformations/rest/info" ,
39513961 '{"error":{"code":403,"message":"Access not allowed request","details":[]}}' ,
39523962 ) ;
@@ -4020,7 +4030,7 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
40204030 solutionItemExtent : solutionItemExtent ,
40214031 } ;
40224032
4023- fetchMock . post (
4033+ fetchMock . get (
40244034 "http://utility/geomServer/findTransformations/rest/info" ,
40254035 '{"error":{"code":403,"message":"Access not allowed request","details":[]}}' ,
40264036 ) ;
@@ -4099,7 +4109,8 @@ describe("Module `restHelpers`: common REST utility functions shared across pack
40994109 utils . getPortalsSelfResponse ( ) ,
41004110 )
41014111 . post ( "https://utility.arcgisonline.com/arcgis/rest/info" , utils . getPortalsSelfResponse ( ) )
4102- . post ( geometryServiceUrl + "/findTransformations" , mockItems . get400Failure ( ) )
4112+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=102100&outSR=3857&extentOfInterest=%7B%22xmin%22%3A-9821384.714217981%2C%22ymin%22%3A5117339.123090005%2C%22xmax%22%3A-9797228.384715842%2C%22ymax%22%3A5137789.39951188%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D" , mockItems . get400Failure ( ) )
4113+ . get ( geometryServiceUrl + "/findTransformations?f=json&inSR=4326&outSR=3857&extentOfInterest=%7B%22xmin%22%3A-179%2C%22xmax%22%3A179%2C%22ymin%22%3A-89%2C%22ymax%22%3A89%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D" , mockItems . get400Failure ( ) )
41034114 . post (
41044115 "http://utility/geomServer/findTransformations/rest/info" ,
41054116 '{"error":{"code":403,"message":"Access not allowed request","details":[]}}' ,
0 commit comments