From 2a6dc3e717cd2a972d6db31bdbadc20bcda343c2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Wed, 2 Feb 2022 11:45:32 -0500 Subject: [PATCH] [Group] [Yaml] Add error if GroupId field isn't used properly in yaml test (#14614) * Add error if GroupId field isn't use properly --- src/app/zap-templates/common/ClusterTestGeneration.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 2b67190434656c..21b15f94dcffad 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -174,6 +174,13 @@ function setDefaultTypeForCommand(test) break; } + // Sanity Check for GroupId usage + // Only two types of actions can be send to Group : Write attribute, and Commands + // Spec : Action 8.2.4 + if ((kGroupId in test) && !test.isGroupCommand) { + printErrorAndExit(this, 'Wrong Yaml configuration. Action : ' + test.commandName + " can't be sent to group " + test[kGroupId]); + } + test.isWait = false; }