| # 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: |
| 111.2.5. [TC-DRLK-2.5] Verification for the following Commands - Set Week |
| Day Schedule, Get Week Day Schedule , Get Week Day Schedule Response, Clear |
| Week Day Schedule [DUT-Server] |
| |
| PICS: |
| - DRLK.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Door Lock" |
| endpoint: 1 |
| |
| tests: |
| - label: "Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: "Create new user" |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| |
| - label: "Read the user back and verify its fields" |
| command: "GetUser" |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| - name: "Credentials" |
| value: null |
| - name: "CreatorFabricIndex" |
| value: 1 |
| - name: "LastModifiedFabricIndex" |
| value: 1 |
| - name: "NextUserIndex" |
| value: null |
| |
| - label: "TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute" |
| PICS: DRLK.S.F04 && DRLK.S.A0014 |
| command: "readAttribute" |
| attribute: "NumberOfWeekDaySchedulesSupportedPerUser" |
| response: |
| saveAs: NumberOfWeekDaySchedulesSupportedPerUser |
| constraints: |
| minValue: 0 |
| maxValue: 255 |
| |
| - label: "TH reads NumberOfTotalUsers Supported attribute" |
| PICS: DRLK.S.F08 && DRLK.S.A0011 |
| command: "readAttribute" |
| attribute: "NumberOfTotalUsersSupported" |
| response: |
| saveAs: NumberOfTotalUsersSupported |
| constraints: |
| minValue: 0 |
| maxValue: 65534 |
| |
| - label: "TH send Set Week Day Schedule Command" |
| PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp |
| command: "SetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "DaysMask" |
| value: 2 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| value: 16 |
| - name: "EndMinute" |
| value: 55 |
| |
| #issue #18591 |
| - label: "TH send Get Week Day Schedule Command to DUT" |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x0 |
| - name: "DaysMask" |
| value: 2 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| constraints: |
| hasValue: true |
| minValue: 16 |
| - name: "EndMinute" |
| constraints: |
| hasValue: true |
| minValue: 55 |
| |
| - label: "TH send Set Week Day Schedule Command" |
| PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp |
| command: "SetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "DaysMask" |
| value: 7 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| value: 16 |
| - name: "EndMinute" |
| value: 55 |
| response: |
| error: INVALID_COMMAND |
| |
| - label: "TH send Get Week Day Schedule Command to DUT" |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x85 |
| - name: "DaysMask" |
| constraints: |
| hasValue: false |
| - name: "StartHour" |
| constraints: |
| hasValue: false |
| - name: "StartMinute" |
| constraints: |
| hasValue: false |
| - name: "EndHour" |
| constraints: |
| hasValue: false |
| - name: "EndMinute" |
| constraints: |
| hasValue: false |
| |
| - label: "TH sends Clear Week Day Schedule Command to DUT" |
| PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp |
| command: "ClearWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| |
| - label: "TH sends Get Week Day Schedule Command to DUT" |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x8B |
| - name: "DaysMask" |
| constraints: |
| hasValue: false |
| - name: "StartHour" |
| constraints: |
| hasValue: false |
| - name: "StartMinute" |
| constraints: |
| hasValue: false |
| - name: "EndHour" |
| constraints: |
| hasValue: false |
| - name: "EndMinute" |
| constraints: |
| hasValue: false |
| |
| - label: "Cleanup the created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |