File tree Expand file tree Collapse file tree 1 file changed +27
-22
lines changed
packages/plugins/Gfi/tests Expand file tree Collapse file tree 1 file changed +27
-22
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ describe('GFI Actions', () => {
45
45
layerKeys : [ 'layer1' ] ,
46
46
geometryLayerKeys : [ ] ,
47
47
afterLoadFunction : null ,
48
+ gfiConfiguration : configuration . gfi ,
48
49
}
49
50
50
51
const context = {
@@ -64,6 +65,17 @@ describe('GFI Actions', () => {
64
65
} )
65
66
it ( 'should fetch and process features' , async ( ) => {
66
67
const commit = jest . fn ( )
68
+ const configuration = {
69
+ gfi : {
70
+ layers : {
71
+ layer1 : {
72
+ maxFeatures : 10 ,
73
+ } ,
74
+ } ,
75
+ mode : 'bboxDot' ,
76
+ maxFeatures : 10 ,
77
+ } ,
78
+ }
67
79
const rootGetters = {
68
80
map : {
69
81
getLayers : ( ) => ( {
@@ -75,22 +87,13 @@ describe('GFI Actions', () => {
75
87
} ) ,
76
88
} ) ,
77
89
} ,
78
- configuration : {
79
- gfi : {
80
- layers : {
81
- layer1 : {
82
- maxFeatures : 10 ,
83
- } ,
84
- } ,
85
- mode : 'bboxDot' ,
86
- maxFeatures : 10 ,
87
- } ,
88
- } ,
90
+ configuration,
89
91
}
90
92
const getters = {
91
93
layerKeys : [ 'layer1' ] ,
92
94
geometryLayerKeys : [ 'layer1' ] ,
93
95
afterLoadFunction : null ,
96
+ gfiConfiguration : configuration . gfi ,
94
97
}
95
98
96
99
const context = {
@@ -127,6 +130,17 @@ describe('GFI Actions', () => {
127
130
} )
128
131
it ( 'should handle failed feature request' , async ( ) => {
129
132
const commit = jest . fn ( )
133
+ const configuration = {
134
+ gfi : {
135
+ layers : {
136
+ layer1 : {
137
+ maxFeatures : 10 ,
138
+ } ,
139
+ } ,
140
+ mode : 'bboxDot' ,
141
+ maxFeatures : 10 ,
142
+ } ,
143
+ }
130
144
const rootGetters = {
131
145
map : {
132
146
getLayers : ( ) => ( {
@@ -138,22 +152,13 @@ describe('GFI Actions', () => {
138
152
} ) ,
139
153
} ) ,
140
154
} ,
141
- configuration : {
142
- gfi : {
143
- layers : {
144
- layer1 : {
145
- maxFeatures : 10 ,
146
- } ,
147
- } ,
148
- mode : 'bboxDot' ,
149
- maxFeatures : 10 ,
150
- } ,
151
- } ,
155
+ configuration,
152
156
}
153
157
const getters = {
154
158
layerKeys : [ 'layer1' ] ,
155
159
geometryLayerKeys : [ 'layer1' ] ,
156
160
afterLoadFunction : null ,
161
+ gfiConfiguration : configuration . gfi ,
157
162
}
158
163
159
164
const context = {
You can’t perform that action at this time.
0 commit comments