# Copyright (c) 2024 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.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default

name:
    19.15.1. [TC-APPOBSERVER-13.1] Content App Message Verification (DUT as
    Client)

PICS:
    - APPOBSERVER.C

config:
    nodeId: 0x12344321
    cluster: "Basic Information"
    endpoint: 0

tests:
    - label: "Step 1: DUT sends ContentAppMessage command to TH"
      PICS: KEYPADINPUT.C.C00.Tx
      verification: |
          ./chip-tool contentappobserver content-app-message foo 1 1 --Data bar

          On TH (tv-casting-app), Verify the ContentAppMessage command is received successfully.

          [1705666572.863129][11679:11679] CHIP:EM: >>> [E:743r S:18420 M:87646249] (S) Msg RX from 1:000000000001B669 [A5ED] --- Type 0001:08 (IM:InvokeCommandRequest)
          [1705666572.863201][11679:11679] CHIP:EM: Handling via exchange: 743r, Delegate: 0xaaaac06f4b78
          [1705666572.863301][11679:11679] CHIP:DMG: InvokeRequestMessage =
          [1705666572.863340][11679:11679] CHIP:DMG: {
          [1705666572.863372][11679:11679] CHIP:DMG:         suppressResponse = false,
          [1705666572.863409][11679:11679] CHIP:DMG:         timedRequest = false,
          [1705666572.863444][11679:11679] CHIP:DMG:         InvokeRequests =
          [1705666572.863510][11679:11679] CHIP:DMG:         [
          [1705666572.863546][11679:11679] CHIP:DMG:                 CommandDataIB =
          [1705666572.863599][11679:11679] CHIP:DMG:                 {
          [1705666572.863636][11679:11679] CHIP:DMG:                         CommandPathIB =
          [1705666572.863693][11679:11679] CHIP:DMG:                         {
          [1705666572.863738][11679:11679] CHIP:DMG:                                 EndpointId = 0x1,
          [1705666572.863784][11679:11679] CHIP:DMG:                                 ClusterId = 0x510,
          [1705666572.863829][11679:11679] CHIP:DMG:                                 CommandId = 0x0,
          [1705666572.863884][11679:11679] CHIP:DMG:                         },
          [1705666572.863930][11679:11679] CHIP:DMG:
          [1705666572.863969][11679:11679] CHIP:DMG:                         CommandFields =
          [1705666572.864025][11679:11679] CHIP:DMG:                         {
          [1705666572.864073][11679:11679] CHIP:DMG:                                 0x0 = "bar" (3 chars),
          [1705666572.864121][11679:11679] CHIP:DMG:                                 0x1 = "foo" (3 chars),
          [1705666572.864184][11679:11679] CHIP:DMG:                         },
          [1705666572.864226][11679:11679] CHIP:DMG:                 },
          [1705666572.864269][11679:11679] CHIP:DMG:
          [1705666572.864317][11679:11679] CHIP:DMG:         ],
          [1705666572.864361][11679:11679] CHIP:DMG:
          [1705666572.864395][11679:11679] CHIP:DMG:         InteractionModelRevision = 11
          [1705666572.864440][11679:11679] CHIP:DMG: },
          [1705666572.864617][11679:11679] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0510 e=1 p=o
          [1705666572.864667][11679:11679] CHIP:DMG: AccessControl: allowed
          [1705666572.864719][11679:11679] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0510 Command=0x0000_0000
          [1705666572.864834][11679:11679] CHIP:ZCL: ContentAppObserver NOT returning ContentApp delegate for endpoint:1
      disabled: true
