| # Copyright (c) 2021 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| name: |
| Window Covering [TC-WNCV-4.4] GoToTiltPercentage Limits Verification with |
| server as DUT |
| |
| PICS: |
| - WNCV.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Window Covering" |
| endpoint: 1 |
| |
| tests: |
| - label: "0: Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| ### CONDITIONAL TILT Tests from FeatureMap |
| ######## Check attribute coherence ####### |
| ### Step 1x -> Verify the Tilt Percent100ths and Percent attributes |
| ### Shall be tested as equals CurrentPositionTiltPercent100ths |
| - label: |
| "1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from |
| DUT" |
| command: "readAttribute" |
| attribute: "CurrentPositionTiltPercent100ths" |
| PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f |
| response: |
| saveAs: attrCurrentPositionTiltPercent100ths |
| constraints: |
| minValue: 0 |
| maxValue: 10000 |
| |
| - label: |
| "1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from |
| DUT + assert CurrentPositionTiltPercent100ths/100 equals |
| CurrentPositionTiltPercentage" |
| command: "readAttribute" |
| attribute: "CurrentPositionTiltPercentage" |
| PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f && WNCV.S.A0009 |
| response: |
| value: attrCurrentPositionTiltPercent100ths / 100 |
| constraints: |
| minValue: 0 |
| maxValue: 100 |
| |
| ######## Command BadParams 1 ####### |
| ### Step 2x -> Verify the GoToTiltPercentage with a BadParam |
| |
| # - label: "2a: TH Generate a random badParam" |
| # since we don't know how to generate a random bad param |
| # we use a default badParam for this test |
| |
| - label: "2b: TH sends GoToTiltPercentage command with BadParam to DUT" |
| command: "GoToTiltPercentage" |
| PICS: WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp |
| arguments: |
| values: |
| - name: "TiltPercent100thsValue" |
| value: 0x3000 |
| - name: "TiltPercentageValue" |
| value: 0x3F |
| response: |
| error: CONSTRAINT_ERROR |
| |
| ######## Command BadParams 2 ###### |
| ### Step 3x -> Verify the GoToTiltPercentage with 10001 as param |
| - label: "3a: TH sends GoToTiltPercentage command with 10001 to DUT" |
| command: "GoToTiltPercentage" |
| PICS: WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp |
| arguments: |
| values: |
| - name: "TiltPercent100thsValue" |
| value: 10001 |
| - name: "TiltPercentageValue" |
| value: 100 |
| response: |
| error: CONSTRAINT_ERROR |
| |
| ######## Command BadParams 3 ###### |
| ### Step 4x -> Verify the GoToTiltPercentage with 0xFFFF as param |
| - label: "4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT" |
| command: "GoToTiltPercentage" |
| PICS: WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp |
| arguments: |
| values: |
| - name: "TiltPercent100thsValue" |
| value: 0xFFFF |
| - name: "TiltPercentageValue" |
| value: 0xFF |
| response: |
| error: CONSTRAINT_ERROR |