Skip to content

Commit 53530a7

Browse files
committed
test(map): assert goto target in v1 map snapshots and fix fixture doc
1 parent aab2927 commit 53530a7

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/map/__snapshots__/test_map_parser.ambr‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'minor_version': 0,
1010
}),
1111
'charger': Point(x=25612, y=25254, a=None),
12+
'goto': None,
1213
'goto_path_points': 0,
1314
'image_format': 'PNG',
1415
'image_size': tuple(
@@ -42,6 +43,7 @@
4243
'minor_version': 0,
4344
}),
4445
'charger': Point(x=25612, y=25254, a=None),
46+
'goto': Point(x=25874, y=26218, a=None),
4547
'goto_path_points': 0,
4648
'image_format': 'PNG',
4749
'image_size': tuple(
@@ -71,6 +73,7 @@
7173
'minor_version': 1,
7274
}),
7375
'charger': Point(x=25652, y=25222, a=98),
76+
'goto': None,
7477
'goto_path_points': 0,
7578
'image_format': 'PNG',
7679
'image_size': tuple(
@@ -103,6 +106,7 @@
103106
'minor_version': 0,
104107
}),
105108
'charger': Point(x=25273, y=25603, a=-1),
109+
'goto': None,
106110
'goto_path_points': 0,
107111
'image_format': 'PNG',
108112
'image_size': tuple(

‎tests/map/test_map_parser.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def _map_data_to_snapshot(result: ParsedMapData) -> dict[str, Any]:
2727
"image_format": image.format,
2828
"charger": md.charger,
2929
"vacuum_position": md.vacuum_position,
30+
"goto": md.goto,
3031
"rooms": md.rooms,
3132
"walls": md.walls,
3233
"no_go_areas": md.no_go_areas,

‎tests/map/testdata/v1/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ The fixtures in this directory are adapted from the [Valetudo](https://github.co
1616
| :--- | :--- | :--- | :--- |
1717
| `s5_fw2008_with_segments.bin` | `S5_FW2008_with_segments.bin` | Roborock S5 (fw 2008) | Multi-room segmentation (rooms 1 & 2), charger dock location, vacuum position, and path coordinates. |
1818
| `s5_fw1886_with_forbidden_zones_and_virtual_walls.bin` | `S5_FW1886_with_forbidden_zones_and_virtual_walls_and_currently_cleaned_zones.bin` | Roborock S5 (fw 1886) | Virtual walls (`walls`), forbidden/no-go zones (`no_go_areas`), and currently cleaned zones (`zones`). |
19-
| `s5_fw1886_with_goto_target.bin` | `S5_FW1886_with_goto_target.bin` | Roborock S5 (fw 1886) | Pinpoint target location (`goto_target`) and computed path to target (`goto_path`). |
19+
| `s5_fw1886_with_goto_target.bin` | `S5_FW1886_with_goto_target.bin` | Roborock S5 (fw 1886) | Pinpoint target location (`goto`) and predicted navigation path to target (`predicted_path`). |
2020
| `s6_fw2652_with_active_segment_and_no_mop_zone.bin` | `S6_FW2652_with_active_segment_and_no_mop_zone.bin` | Roborock S6 (fw 2652) | Complex layout with 6 segmented rooms (16, 17, 18, 19, 20, 21), active cleaning segment, and no-mop zone. |

0 commit comments

Comments
 (0)