SmartThingsEdgeDrivers icon indicating copy to clipboard operation
SmartThingsEdgeDrivers copied to clipboard

Update supported mode for every operation

Open HunsupJung opened this issue 1 year ago • 6 comments

Check all that apply

Type of Change

  • [ ] WWST Certification Request
    • If this is your first time contributing code:
      • [ ] I have reviewed the README.md file
      • [ ] I have reviewed the CODE_OF_CONDUCT.md file
      • [ ] I have signed the CLA
    • [ ] I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • [x] Bug fix
  • [ ] New feature
  • [ ] Refactor

Checklist

  • [x] I have performed a self-review of my code
  • [ ] I have commented my code in hard-to-understand areas
  • [x] I have verified my changes by testing with a device or have communicated a plan for testing
  • [ ] I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

Spec has the following items.

Cleaning can only be started when the RVC Run Mode cluster’s CurrentMode attribute is set to a mode that has the Idle mode tag associated with it, and the RVC Operational State cluster’s OperationalState attribute is set to the Stopped, Paused, Docked or Charging state. #endif::[]

So If it is set to a mode that does not have an idle tag, it should be prevented from switching to a mode that does not have an idle tag because it is not possible.

Summary of Completed Tests

HunsupJung avatar Dec 09 '24 05:12 HunsupJung

Duplicate profile check: Passed - no duplicate profiles detected.

github-actions[bot] avatar Dec 09 '24 05:12 github-actions[bot]

Test Results

   65 files  ± 0    417 suites  ±0   0s ⏱️ ±0s 2 133 tests +12  2 133 ✅ +12  0 💤 ±0  0 ❌ ±0  3 636 runs  +12  3 636 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit 04e696ba. ± Comparison against base commit d09ed9ba.

This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.
Operational state should generate correct messages
On changing the OperationalError, robotCleanerOperatingState must be set to the appropriate value
On changing the clean mode, mode must be set to the appropriate value
On changing the operatinalState to CHARGING, robotCleanerOperatingState must be set to the appropriate value
On changing the operatinalState to DOCKED, robotCleanerOperatingState must be set to the appropriate value
On changing the operatinalState to PAUSED, robotCleanerOperatingState must be set to the appropriate value
On changing the operatinalState to RUNNING, robotCleanerOperatingState must be set to the appropriate value
On changing the operatinalState to SEEKING_CHARGER, robotCleanerOperatingState must be set to the appropriate value
On changing the operatinalState to STOPPED, robotCleanerOperatingState must be set to the appropriate value
On changing the run mode to a mode with an CLEANING tag, supportedArgument must be set to the appropriate value
On changing the run mode to a mode with an IDLE tag, supportedArgument must be set to the appropriate value
…

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Dec 09 '24 05:12 github-actions[bot]

File Coverage
All files 92% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-rvc/src/init.lua 92% :white_check_mark:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against 04e696ba44af187b06ad3cfefa09ba6c2e373196

github-actions[bot] avatar Dec 09 '24 05:12 github-actions[bot]

Channel deleted.

github-actions[bot] avatar Dec 09 '24 05:12 github-actions[bot]

I tested this with the VDA and it looks good except the operational state is not updating (it always says Stopped). I think this is an issue with the VDA because it is not sending an update for Operational State after changing the run mode

nickolas-deboom avatar Jan 14 '25 20:01 nickolas-deboom

I tested this with the VDA and it looks good except the operational state is not updating (it always says Stopped). I think this is an issue with the VDA because it is not sending an update for Operational State after changing the run mode

Can a unit test ensure this works as expected, or does one already exist? Thank you :smile:

hcarter-775 avatar Jan 14 '25 20:01 hcarter-775