@eox/itemfilter 0.14.2-dev.0 → 0.14.2-dev.1721300053.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "0.14.2-dev.0",
3
+ "version": "0.14.2-dev.1721300053.0",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@eox/eslint-config": "^1.0.0",
@@ -8,3 +8,4 @@ export { default as disableHighlightTest } from "./disable-highlight";
8
8
  export { default as accordionTest } from "./accordion";
9
9
  export { default as spatialFilterTest } from "./spatial-filter";
10
10
  export { default as externalFilterTest } from "./external-filter";
11
+ export { default as nestedPropertyTest } from "./nested-property";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Tests the behavior of the eox-itemfilter when it has nested property as a key
3
+ */
4
+ const nestedPropertyTest = () => {
5
+ cy.get("eox-itemfilter").then(($el) => {
6
+ $el[0].config = {
7
+ ...$el[0].config,
8
+ filterProperties: [
9
+ ...$el[0].config.filterProperties,
10
+ { key: "status.code", title: "Status", expanded: true },
11
+ ],
12
+ };
13
+ });
14
+
15
+ cy.get("eox-itemfilter")
16
+ .shadow()
17
+ .within(() => {
18
+ cy.get("[id='filter-status.code']")
19
+ .shadow()
20
+ .within(() => {
21
+ cy.get('[type="checkbox"]').first().check();
22
+ cy.get(".title").first().contains("active");
23
+ cy.get(".title").last().contains("inactive");
24
+ });
25
+ });
26
+ };
27
+
28
+ export default nestedPropertyTest;
@@ -10,6 +10,7 @@ import {
10
10
  accordionTest,
11
11
  spatialFilterTest,
12
12
  externalFilterTest,
13
+ nestedPropertyTest,
13
14
  } from "./cases/general/";
14
15
 
15
16
  /**
@@ -86,4 +87,9 @@ describe("Item Filter Config", () => {
86
87
  * Test case to check whether itemfilter is using external filter correctly or not.
87
88
  */
88
89
  it("should run external filter", () => externalFilterTest());
90
+
91
+ /**
92
+ * Test case to check whether nested properties work or not
93
+ */
94
+ it("should run with nested property", () => nestedPropertyTest());
89
95
  });
@@ -24,7 +24,10 @@
24
24
  ]
25
25
  ]
26
26
  },
27
- "tags": ["agriculture", "Sentinel-2", "asparagus"]
27
+ "tags": ["agriculture", "Sentinel-2", "asparagus"],
28
+ "status": {
29
+ "code": "active"
30
+ }
28
31
  },
29
32
  {
30
33
  "archived": false,
@@ -51,7 +54,10 @@
51
54
  ]
52
55
  ]
53
56
  },
54
- "tags": ["agriculture", "workers", "availability"]
57
+ "tags": ["agriculture", "workers", "availability"],
58
+ "status": {
59
+ "code": "inactive"
60
+ }
55
61
  },
56
62
  {
57
63
  "archived": false,
@@ -78,7 +84,10 @@
78
84
  ]
79
85
  ]
80
86
  },
81
- "tags": ["air quality", "sea ice", "freeboard"]
87
+ "tags": ["air quality", "sea ice", "freeboard"],
88
+ "status": {
89
+ "code": "active"
90
+ }
82
91
  },
83
92
  {
84
93
  "archived": false,
@@ -93,7 +102,10 @@
93
102
  "years": [2021, 2022],
94
103
  "timestamp": "2023-06-11T13:56:38+00:00",
95
104
  "datetime": ["2023-06-11T10:56:38+00:00", "2023-06-11T22:56:38+00:00"],
96
- "tags": ["economy", "vessel density", "average"]
105
+ "tags": ["economy", "vessel density", "average"],
106
+ "status": {
107
+ "code": "inactive"
108
+ }
97
109
  },
98
110
  {
99
111
  "archived": false,
@@ -108,7 +120,10 @@
108
120
  "years": [2005, 2016],
109
121
  "timestamp": "2023-06-10T13:56:38+00:00",
110
122
  "datetime": ["2023-06-10T10:56:38+00:00", "2023-06-10T22:56:38+00:00"],
111
- "tags": ["economy", "vessel density", "cargo"]
123
+ "tags": ["economy", "vessel density", "cargo"],
124
+ "status": {
125
+ "code": "active"
126
+ }
112
127
  },
113
128
  {
114
129
  "archived": false,
@@ -123,7 +138,10 @@
123
138
  "years": [2006, 2017],
124
139
  "timestamp": "2023-06-09T13:56:38+00:00",
125
140
  "datetime": ["2023-06-09T10:56:38+00:00", "2023-06-09T22:56:38+00:00"],
126
- "tags": ["economy", "vessel density", "tanker"]
141
+ "tags": ["economy", "vessel density", "tanker"],
142
+ "status": {
143
+ "code": "inactive"
144
+ }
127
145
  },
128
146
  {
129
147
  "archived": false,
@@ -138,7 +156,10 @@
138
156
  "years": [2001, 2003],
139
157
  "timestamp": "2023-06-08T13:56:38+00:00",
140
158
  "datetime": ["2023-06-08T10:56:38+00:00", "2023-06-08T22:56:38+00:00"],
141
- "tags": ["economy", "vessel density", "others"]
159
+ "tags": ["economy", "vessel density", "others"],
160
+ "status": {
161
+ "code": "active"
162
+ }
142
163
  },
143
164
  {
144
165
  "archived": false,
@@ -154,7 +175,10 @@
154
175
  "years": [2015, 2020],
155
176
  "timestamp": "2023-06-07T13:56:38+00:00",
156
177
  "datetime": ["2023-06-07T10:56:38+00:00", "2023-06-07T22:56:38+00:00"],
157
- "tags": ["economy", "air", "NO2", "boat traffic"]
178
+ "tags": ["economy", "air", "NO2", "boat traffic"],
179
+ "status": {
180
+ "code": "inactive"
181
+ }
158
182
  },
159
183
  {
160
184
  "archived": false,
@@ -169,7 +193,10 @@
169
193
  "years": [2021, 2021],
170
194
  "timestamp": "2023-06-06T13:56:38+00:00",
171
195
  "datetime": ["2023-06-06T10:56:38+00:00", "2023-06-06T22:56:38+00:00"],
172
- "tags": ["air", "temperature", "C3S Data"]
196
+ "tags": ["air", "temperature", "C3S Data"],
197
+ "status": {
198
+ "code": "active"
199
+ }
173
200
  },
174
201
  {
175
202
  "archived": false,
@@ -184,7 +211,10 @@
184
211
  "years": [2000, 2023],
185
212
  "timestamp": "2023-06-05T13:56:38+00:00",
186
213
  "datetime": ["2023-06-05T10:56:38+00:00", "2023-06-05T22:56:38+00:00"],
187
- "tags": ["air", "PM2.5", "city level"]
214
+ "tags": ["air", "PM2.5", "city level"],
215
+ "status": {
216
+ "code": "inactive"
217
+ }
188
218
  },
189
219
  {
190
220
  "archived": false,
@@ -199,7 +229,10 @@
199
229
  "years": [2019, 2022],
200
230
  "timestamp": "2023-06-04T13:56:38+00:00",
201
231
  "datetime": ["2023-06-04T10:56:38+00:00", "2023-06-04T22:56:38+00:00"],
202
- "tags": ["air", "NO2", "city level"]
232
+ "tags": ["air", "NO2", "city level"],
233
+ "status": {
234
+ "code": "active"
235
+ }
203
236
  },
204
237
  {
205
238
  "archived": false,
@@ -214,7 +247,10 @@
214
247
  "years": [2014, 2018],
215
248
  "timestamp": "2023-06-03T13:56:38+00:00",
216
249
  "datetime": ["2023-06-03T10:56:38+00:00", "2023-06-03T22:56:38+00:00"],
217
- "tags": ["air", "PM10", "city level"]
250
+ "tags": ["air", "PM10", "city level"],
251
+ "status": {
252
+ "code": "inactive"
253
+ }
218
254
  },
219
255
  {
220
256
  "archived": false,
@@ -229,7 +265,10 @@
229
265
  "years": [2017, 2018],
230
266
  "timestamp": "2023-06-02T13:56:38+00:00",
231
267
  "datetime": ["2023-06-02T10:56:38+00:00", "2023-06-02T22:56:38+00:00"],
232
- "tags": ["air", "O3", "city level"]
268
+ "tags": ["air", "O3", "city level"],
269
+ "status": {
270
+ "code": "active"
271
+ }
233
272
  },
234
273
  {
235
274
  "archived": false,
@@ -244,7 +283,10 @@
244
283
  "years": [2018, 2019],
245
284
  "timestamp": "2023-06-01T13:56:38+00:00",
246
285
  "datetime": ["2023-06-01T10:56:38+00:00", "2023-06-01T22:56:38+00:00"],
247
- "tags": ["economy", "cargo ships", "AIS data"]
286
+ "tags": ["economy", "cargo ships", "AIS data"],
287
+ "status": {
288
+ "code": "inactive"
289
+ }
248
290
  },
249
291
  {
250
292
  "archived": false,
@@ -259,7 +301,10 @@
259
301
  "years": [2015, 2017],
260
302
  "timestamp": "2023-05-29T13:56:38+00:00",
261
303
  "datetime": ["2023-05-29T10:56:38+00:00", "2023-05-29T22:56:38+00:00"],
262
- "tags": ["economy", "traffic", "mobile data"]
304
+ "tags": ["economy", "traffic", "mobile data"],
305
+ "status": {
306
+ "code": "active"
307
+ }
263
308
  },
264
309
  {
265
310
  "archived": false,
@@ -274,7 +319,10 @@
274
319
  "years": [2014, 2015],
275
320
  "timestamp": "2023-05-28T13:56:38+00:00",
276
321
  "datetime": ["2023-05-28T10:56:38+00:00", "2023-05-28T22:56:38+00:00"],
277
- "tags": ["water", "CHL-a", "concentration"]
322
+ "tags": ["water", "CHL-a", "concentration"],
323
+ "status": {
324
+ "code": "inactive"
325
+ }
278
326
  },
279
327
  {
280
328
  "archived": false,
@@ -289,7 +337,10 @@
289
337
  "years": [2001, 2013],
290
338
  "timestamp": "2023-05-27T13:56:38+00:00",
291
339
  "datetime": ["2023-05-27T10:56:38+00:00", "2023-05-27T22:56:38+00:00"],
292
- "tags": ["health", "Covid-19", "cases"]
340
+ "tags": ["health", "Covid-19", "cases"],
341
+ "status": {
342
+ "code": "active"
343
+ }
293
344
  },
294
345
  {
295
346
  "archived": false,
@@ -304,7 +355,10 @@
304
355
  "years": [2015, 2016],
305
356
  "timestamp": "2023-05-26T13:56:38+00:00",
306
357
  "datetime": ["2023-05-26T10:56:38+00:00", "2023-05-26T22:56:38+00:00"],
307
- "tags": ["health", "Covid-19", "vaccinations"]
358
+ "tags": ["health", "Covid-19", "vaccinations"],
359
+ "status": {
360
+ "code": "inactive"
361
+ }
308
362
  },
309
363
  {
310
364
  "archived": false,
@@ -319,7 +373,10 @@
319
373
  "years": [2014, 2020],
320
374
  "timestamp": "2023-05-25T13:56:38+00:00",
321
375
  "datetime": ["2023-05-25T10:56:38+00:00", "2023-05-25T22:56:38+00:00"],
322
- "tags": ["economy", "crude oil", "input materials"]
376
+ "tags": ["economy", "crude oil", "input materials"],
377
+ "status": {
378
+ "code": "active"
379
+ }
323
380
  },
324
381
  {
325
382
  "archived": false,
@@ -334,6 +391,9 @@
334
391
  "years": [1998, 1999],
335
392
  "timestamp": "2023-05-24T13:56:38+00:00",
336
393
  "datetime": ["2023-05-24T10:56:38+00:00", "2023-05-24T22:56:38+00:00"],
337
- "tags": ["economy", "cruise ships", "AIS data"]
394
+ "tags": ["economy", "cruise ships", "AIS data"],
395
+ "status": {
396
+ "code": "inactive"
397
+ }
338
398
  }
339
399
  ]