@@ -26,8 +26,6 @@ describe('leaflet_testFieldService', function () {
2626 setTimeout ( function ( ) {
2727 try {
2828 expect ( getFieldsService ) . not . toBeNull ( ) ;
29- expect ( getFieldsService . options . dataSourceName ) . toBe ( "World" ) ;
30- expect ( getFieldsService . options . dataSetName ) . toBe ( "continent_T" ) ;
3129 expect ( serviceResult . type ) . toBe ( "processCompleted" ) ;
3230 expect ( serviceResult . object . datasource ) . toBe ( "World" ) ;
3331 expect ( serviceResult . object . dataset ) . toBe ( "continent_T" ) ;
@@ -49,14 +47,15 @@ describe('leaflet_testFieldService', function () {
4947
5048 //字段查询服务 失败事件
5149 it ( 'failEvent:getFields_dataSourceNotExist' , function ( done ) {
52- var getFieldsService = L . supermap . fieldService ( dataServiceURL ) . getFields ( params , function ( result ) {
50+ var getFieldsService = L . supermap . fieldService ( dataServiceURL ) . getFields ( {
51+ datasource : "World1" ,
52+ dataset : "continent_T"
53+ } , function ( result ) {
5354 serviceResult = result
5455 } ) ;
5556 setTimeout ( function ( ) {
5657 try {
5758 expect ( getFieldsService ) . not . toBeNull ( ) ;
58- expect ( getFieldsService . options . dataSourceName ) . toBe ( "World1" ) ;
59- expect ( getFieldsService . options . dataSetName ) . toBe ( "continent_T" ) ;
6059 expect ( serviceResult . type ) . toBe ( "processFailed" ) ;
6160 expect ( serviceResult . object . datasource ) . toBe ( "World1" ) ;
6261 expect ( serviceResult . object . dataset ) . toBe ( "continent_T" ) ;
@@ -89,8 +88,6 @@ describe('leaflet_testFieldService', function () {
8988 setTimeout ( function ( ) {
9089 try {
9190 expect ( getFieldStatisticsInfoService ) . not . toBeNull ( ) ;
92- expect ( getFieldStatisticsInfoService . options . dataSourceName ) . toBe ( "World" ) ;
93- expect ( getFieldStatisticsInfoService . options . dataSetName ) . toBe ( "continent_T" ) ;
9491 expect ( getFieldStatisticsInfoService . currentStatisticResult . fieldName ) . toBe ( "SmID" ) ;
9592 expect ( getFieldStatisticsInfoService . currentStatisticResult . AVERAGE ) . toEqual ( 4 ) ;
9693 expect ( getFieldStatisticsInfoService . currentStatisticResult . MAX ) . toEqual ( 7 ) ;
@@ -131,8 +128,6 @@ describe('leaflet_testFieldService', function () {
131128 setTimeout ( function ( ) {
132129 try {
133130 expect ( getFieldStatisticsInfoService ) . not . toBeNull ( ) ;
134- expect ( getFieldStatisticsInfoService . options . dataSourceName ) . toBe ( "World1" ) ;
135- expect ( getFieldStatisticsInfoService . options . dataSetName ) . toBe ( "continent_T" ) ;
136131 expect ( getFieldStatisticsInfoService . currentStatisticResult . fieldName ) . toBe ( "SmID" ) ;
137132 expect ( getFieldStatisticsInfoService . currentStatisticResult . AVERAGE ) . toBeNull ( ) ;
138133 expect ( getFieldStatisticsInfoService . currentStatisticResult . MAX ) . toBeNull ( ) ;
0 commit comments