Skip to content

Commit

Permalink
WindowCovering: Add TC_WNCV_4.5 + update default config (#17423)
Browse files Browse the repository at this point in the history
* YAML: Add position storage test WNCV 4.5

* Test : add new WNCV_4_5 to chip-tools

* fix: YAML WNCV_4_5

* ZAP: add chip-tool darwin config

* YAML Update config for WNCV_4_5

* Fix: Percentage font not supported

* Zap: Update default configuration Current/Target

* Restyled by clang-format

* Restyled by prettier-yaml

* FIX: Style not aligned for Tests

* CFG: Style prevent clang format over Darwin test lists

* ZAP: regen update

* Restyled by whitespace

* Restyled by google-java-format

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
jmeg-sfy and restyled-commits authored Apr 19, 2022
1 parent 6fc4608 commit 57a2e53
Show file tree
Hide file tree
Showing 6 changed files with 763 additions and 33 deletions.
10 changes: 9 additions & 1 deletion examples/chip-tool-darwin/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function getManualTests()
return [];
}

// clang-format off

function getTests()
{
const AccessControl = [
Expand Down Expand Up @@ -174,7 +176,10 @@ function getTests()
];

const OnOff = [
'Test_TC_OO_1_1', 'Test_TC_OO_2_1', 'Test_TC_OO_2_2', 'Test_TC_OO_2_3',
'Test_TC_OO_1_1',
'Test_TC_OO_2_1',
'Test_TC_OO_2_2',
'Test_TC_OO_2_3',
// 'Test_TC_OO_2_4', Disable this Test for now as Darwin does not support reboot commands currently
];

Expand Down Expand Up @@ -261,6 +266,7 @@ function getTests()
'Test_TC_WNCV_3_5',
'Test_TC_WNCV_4_3',
'Test_TC_WNCV_4_4',
//'Test_TC_WNCV_4_5', Disable this Test for now as Darwin does not support reboot commands currently
];

const Others = [
Expand Down Expand Up @@ -329,6 +335,8 @@ function getTests()
return tests.flat(1);
}

// clang-format on

//
// Module exports
//
Expand Down
1 change: 1 addition & 0 deletions examples/chip-tool/templates/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ function getTests()
'Test_TC_WNCV_4_2',
'Test_TC_WNCV_4_3',
'Test_TC_WNCV_4_4',
'Test_TC_WNCV_4_5',
];

const TV = [
Expand Down
32 changes: 16 additions & 16 deletions examples/window-app/common/window-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -7956,7 +7956,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -7971,7 +7971,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -8001,7 +8001,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -8016,7 +8016,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -8046,7 +8046,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": null,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -8061,7 +8061,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": null,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -8091,7 +8091,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -8106,7 +8106,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -9297,7 +9297,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -9312,7 +9312,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -9342,7 +9342,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -9357,7 +9357,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -9387,7 +9387,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": null,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -9402,7 +9402,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": null,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -9432,7 +9432,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -9447,7 +9447,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
162 changes: 162 additions & 0 deletions src/app/tests/suites/certification/Test_TC_WNCV_4_5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# 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.5] Positions Storage Verification with server as
DUT

config:
nodeId: 0x12344321
cluster: "Window Covering"
endpoint: 1
discriminator:
type: INT16U
defaultValue: 3840

tests:
################ Init Phase #############
- label: "0a: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

### Trying to randomize DUT's positions
- label: "0b: TH sends UpOrOpen command to preposition the DUT"
command: "UpOrOpen"

######## Command GoTo 1 #######
### Step 1x -> Check GoToLiftPercentage NVM effects
- label:
"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to
DUT"
command: "GoToLiftPercentage"
PICS: WNCV_LF && WNCV_PA_LF
arguments:
values:
- name: "LiftPercent100thsValue"
value: 9000
- name: "LiftPercentageValue"
value: 90

- label: "1b: TH Waits for 100ms-1s"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 500

- label: "1c: TH sends StopMotion command to DUT"
command: "StopMotion"

- label: "1d: TH Waits for 100ms-1s"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 500

######## Command GoTo 2 ######
### Step 2x -> Check GoToTiltPercentage NVM effects
- label:
"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to
DUT"
command: "GoToTiltPercentage"
PICS: WNCV_TL && WNCV_PA_TL
arguments:
values:
- name: "TiltPercent100thsValue"
value: 9000
- name: "TiltPercentageValue"
value: 90

- label: "2b: TH Waits for 100ms-1s"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 500

- label: "2c: TH sends StopMotion command to DUT"
command: "StopMotion"

- label: "2d: TH Waits for 100ms-1s"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 500

######## Check NVM ######
### Step 3x -> Store Positions and Reboot
### CONDITIONAL Lift Store CurrentPositionLiftPercent100ths this value for step 3e
- label: "3a: TH reads CurrentPositionLiftPercent100ths from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercent100ths"
PICS: WNCV_LF && WNCV_PA_LF
response:
saveAs: attrCurrentPositionLiftPercent100ths
constraints:
notValue: 0

### CONDITIONAL Tilt Store CurrentPositionTiltPercent100ths this value for step 3f
- label: "3b: TH reads CurrentPositionTiltPercent100ths from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercent100ths"
PICS: WNCV_TL && WNCV_PA_TL
response:
saveAs: attrCurrentPositionTiltPercent100ths
constraints:
notValue: 0

### DUT TurnOff
- label: "3c: reboot/restart the DUT"
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
arguments:
values:
- name: "discriminator"
value: discriminator

### DUT GoesOff
- label: "3d: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

### CONDITIONAL Lift Compare CurrentPositionLiftPercent100ths with value for step 3a
- label: "3e: TH reads CurrentPositionLiftPercent100ths from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercent100ths"
PICS: WNCV_LF && WNCV_PA_LF
response:
value: attrCurrentPositionLiftPercent100ths

### CONDITIONAL Tilt Compare CurrentPositionTiltPercent100ths with value for step 3b
- label: "3f: TH reads CurrentPositionTiltPercent100ths from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercent100ths"
PICS: WNCV_TL && WNCV_PA_TL
response:
value: attrCurrentPositionTiltPercent100ths
Loading

0 comments on commit 57a2e53

Please sign in to comment.