@@ -8,19 +8,22 @@ Feature: Asset Controller
88 | body .reference | "A1 " |
99 | body .metadata .height | 5 |
1010 Then The document "engine-kuzzle" :"assets" :"Container-A1" content match:
11- | metadata .height | 5 |
12- | metadata .weight | null |
13- | measures .temperatureExt .type | "temperature " |
14- | measures .temperatureInt .type | "temperature " |
15- | measures .position .type | "position " |
16- | linkedDevices | [] |
11+ | metadata .height | 5 |
12+ | metadata .weight | null |
13+ | measures .temperatureExt | null |
14+ | measures .temperatureInt | null |
15+ | measures .position | null |
16+ | linkedDevices | [] |
17+ | _kuzzle_info .author | "-1 " |
18+ # Update metadata
1719 When I successfully execute the action "device-manager/assets" :"update" with args:
1820 | engineId | "engine -kuzzle " |
1921 | _id | "Container -A1 " |
2022 | body .metadata .weight | 1250 |
2123 Then The document "engine-kuzzle" :"assets" :"Container-A1" content match:
22- | metadata .height | 5 |
23- | metadata .weight | 1250 |
24+ | metadata .height | 5 |
25+ | metadata .weight | 1250 |
26+ | _kuzzle_info .updater | "-1 " |
2427 # Get
2528 When I successfully execute the action "device-manager/assets" :"get" with args:
2629 | engineId | "engine -kuzzle " |
@@ -42,11 +45,11 @@ Feature: Asset Controller
4245 Then I should receive a "hits" array of objects matching:
4346 | _id |
4447 | "Container -A1 " |
45- # Delete
46- When I successfully execute the action "device-manager/assets" :"delete" with args:
47- | engineId | "engine -kuzzle " |
48- | _id | "Container -A1 " |
49- Then The document "engine-kuzzle" :"assets" :"Container-A1" does not exists
48+ # Delete
49+ When I successfully execute the action "device-manager/assets" :"delete" with args:
50+ | engineId | "engine -kuzzle " |
51+ | _id | "Container -A1 " |
52+ Then The document "engine-kuzzle" :"assets" :"Container-A1" does not exists
5053
5154 Scenario : Error when creating Asset from unknown model
5255 When I execute the action "device-manager/assets" :"create" with args:
@@ -81,49 +84,3 @@ Feature: Asset Controller
8184 | _source .values .temperature | _source .asset ._id | _source .origin ._id | _source .asset .model |
8285 | 40 | "Container -linked1 " | "DummyTemp -linked1 " | "Container " |
8386 | 41 | "Container -linked1 " | "DummyTemp -linked1 " | "Container " |
84-
85- Scenario : Push a measures in the asset, an other with different name and an older one
86- When I successfully execute the action "device-manager/measures" :"push" with args:
87- | engineId | "engine -ayse " |
88- | body .assetId | "Container -unlinked1 " |
89- | body .measure .type | "temperature " |
90- | body .measure .values .temperature | 26 |
91- | body .measure .type | "temperature " |
92- | body .measure .name | "temperatureExt " |
93- Then The document "engine-ayse" :"assets" :"Container-unlinked1" content match:
94- | measures .temperatureExt .type | "temperature " |
95- | measures .temperatureExt .values .temperature | 26 |
96- When I successfully execute the action "device-manager/measures" :"push" with args:
97- | engineId | "engine -ayse " |
98- | body .assetId | "Container -unlinked1 " |
99- | body .measure .type | "temperature " |
100- | body .measure .values .temperature | -5 |
101- | body .measure .type | "temperature " |
102- | body .measure .name | "temperatureInt " |
103- Then The document "engine-ayse" :"assets" :"Container-unlinked1" content match:
104- | measures .temperatureInt .type | "temperature " |
105- | measures .temperatureInt .values .temperature | -5 |
106- | measures .temperatureExt .type | "temperature " |
107- | measures .temperatureExt .values .temperature | 26 |
108- When I successfully execute the action "device-manager/measures" :"push" with args:
109- | engineId | "engine -ayse " |
110- | body .assetId | "Container -unlinked1 " |
111- | body .measure .type | "temperature " |
112- | body .measure .values .temperature | 31 |
113- | body .measure .type | "temperature " |
114- | body .measure .name | "temperatureExt " |
115- Then The document "engine-ayse" :"assets" :"Container-unlinked1" content match:
116- | measures .temperatureExt .values .temperature | 31 |
117- Then I count 3 documents in "engine-ayse" :"measures"
118-
119- Scenario : Push a measure without name use measure type as name
120- When I successfully execute the action "device-manager/measures" :"push" with args:
121- | engineId | "engine -ayse " |
122- | body .assetId | "Container -unlinked1 " |
123- | body .measure .type | "temperature " |
124- | body .measure .values .temperature | 70 |
125- | body .measure .name | "temperatureExt " |
126- Then The document "engine-ayse" :"assets" :"Container-unlinked1" content match:
127- | measures .temperatureExt .type | "temperature " |
128- | measures .temperatureExt .name | "temperatureExt " |
129- | measures .temperatureExt .values .temperature | 70 |
0 commit comments