Add additional test data devices types for Saros 10, PearlS Lite, and Q5 Max+.#807
Add additional test data devices types for Saros 10, PearlS Lite, and Q5 Max+.#807allenporter wants to merge 6 commits intoPython-roborock:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds new home-data test fixtures for additional Roborock device/product variants (Saros 10 / model a147 and PearlS Lite / model a123) and expands snapshot-based testing to assert decoded DeviceFeatures across all available testdata device/product pairs.
Changes:
- Added new
home_data_product_*.jsonandhome_data_device_*.jsonfixtures for Saros 10 (a147) and PearlS Lite (a123). - Extended
tests/mock_data.pyto buildDEVICE_PRODUCT_PAIRSby joining device fixtures to product fixtures viaproductId. - Added a parametrized snapshot test that constructs
DeviceFeaturesfrom home-data feature flags for every fixture pair, and updated snapshot outputs.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testdata/home_data_product_a147.json | Adds product schema fixture for Saros 10 (a147). |
| tests/testdata/home_data_product_a123.json | Adds product schema fixture for PearlS Lite (a123). |
| tests/testdata/home_data_device_saros.json | Adds device fixture for Saros 10 using featureSet/newFeatureSet. |
| tests/testdata/home_data_device_a123.json | Adds device fixture for PearlS Lite using featureSet/newFeatureSet. |
| tests/test_supported_features.py | Adds parametrized snapshot test over all fixture device/product pairs. |
| tests/mock_data.py | Adds typed device/product parsing and builds DEVICE_PRODUCT_PAIRS; renames S7 fixture constant. |
| tests/devices/traits/v1/snapshots/test_device_features.ambr | Updates trait snapshot outputs to include new fixtures. |
| tests/snapshots/test_supported_features.ambr | Adds snapshots for the new cross-device DeviceFeatures test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s and remove redundant snapshot comment
|
Want to update https://github.com/Python-roborock/python-roborock/blob/main/SUPPORTED_FEATURES.md as well? The script should be able to take from diagnostics |
…nd CLI model mapping
|
PTAL. Some of the fields changed. I think we may be missing app init status so this may be a little lossy compared to the past so we need to start storing that. |
This adds additional device and product information from end user diagnostics and update the snapshots that output the supported trait fields. This also adds a snapshot test for all supported features across all device/product types.