Add additional test data devices types for Saros 10, PearlS Lite, and Q5 Max+.#807
Open
allenporter wants to merge 5 commits intoPython-roborock:mainfrom
Open
Add additional test data devices types for Saros 10, PearlS Lite, and Q5 Max+.#807allenporter wants to merge 5 commits intoPython-roborock:mainfrom
allenporter wants to merge 5 commits intoPython-roborock:mainfrom
Conversation
Contributor
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
Collaborator
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.