11import ol from 'openlayers' ;
2+ import '../../libs/deck.gl/5.1.3/deck.gl' ;
23import { CloverShape } from '../../../src/openlayers/overlay/graphic/CloverShape' ;
34import { HitCloverShape } from '../../../src/openlayers/overlay/graphic/HitCloverShape' ;
45import { Graphic } from '../../../src/openlayers/overlay/Graphic' ;
@@ -33,7 +34,7 @@ describe('openlayers_GraphicLayer', () => {
3334 afterEach ( ( ) => {
3435 jasmine . DEFAULT_TIMEOUT_INTERVAL = originalTimeout ;
3536 window . document . body . removeChild ( testDiv ) ;
36- } ) ;
37+ } ) ;
3738
3839 it ( 'constructor_canvas' , ( done ) => {
3940 spyOn ( FetchRequest , 'commit' ) . and . callFake ( ( ) => {
@@ -92,7 +93,7 @@ describe('openlayers_GraphicLayer', () => {
9293 map . addLayer ( graphicLayer ) ;
9394 } ) ;
9495 setTimeout ( ( ) => {
95- expect ( 1 ) . not . toBeNull ( ) ;
96+ // expect(1).not.toBeNull();
9697 var a = new Graphic ( {
9798 graphics : graphics ,
9899 map : map
@@ -159,7 +160,7 @@ describe('openlayers_GraphicLayer', () => {
159160 map . addLayer ( graphicLayer ) ;
160161 } ) ;
161162 setTimeout ( ( ) => {
162- expect ( 1 ) . not . toBeNull ( ) ;
163+ // expect(1).not.toBeNull();
163164 map . removeLayer ( graphicLayer ) ;
164165 done ( ) ;
165166 } , 1000 )
@@ -221,7 +222,7 @@ describe('openlayers_GraphicLayer', () => {
221222 graphics : graphics ,
222223 map : map ,
223224 onclick : ( result ) => {
224- console . log ( result ) ;
225+ console . log ( result ) ;
225226 } ,
226227 highLightStyle : hitCloverShape
227228 } )
@@ -230,15 +231,16 @@ describe('openlayers_GraphicLayer', () => {
230231 } ) ;
231232
232233 setTimeout ( ( ) => {
233- expect ( 1 ) . not . toBeNull ( ) ;
234- graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( coors [ 2 ] , 1 , ( result ) => {
234+ var resolution = 1 ;
235+ graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( coors [ 2 ] , resolution , ( result ) => {
235236 console . log ( result ) ;
237+ expect ( result ) . not . toBeNull ( ) ;
236238 } ) ;
237- graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( coors [ 1 ] , 1 , ( result ) => {
238- console . log ( result ) ;
239+ graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( coors [ 1 ] , resolution , ( result ) => {
240+ expect ( result ) . not . toBeNull ( ) ;
239241 } ) ;
240- graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( [ - 126.16 , 39.05 ] , 1 , ( result ) => {
241- console . log ( result ) ;
242+ graphicLayer . getSource ( ) . _forEachFeatureAtCoordinate ( [ - 126.16 , 39.05 ] , resolution , ( result ) => {
243+ expect ( result ) . not . toBeNull ( ) ;
242244 } ) ;
243245
244246 let pixel = map . getPixelFromCoordinate ( [ - 36.16 , 39.05 ] ) ;
@@ -249,6 +251,6 @@ describe('openlayers_GraphicLayer', () => {
249251 } ) ;
250252 map . removeLayer ( graphicLayer ) ;
251253 done ( ) ;
252- } , 1000 )
253- } ) ;
254+ } , 4000 )
255+ } ) ;
254256} ) ;
0 commit comments