From 640ee0e4ff860977f3191126427b34146ceee9b2 Mon Sep 17 00:00:00 2001 From: Kishok G <133193761+KishokG@users.noreply.github.com> Date: Tue, 11 Feb 2025 18:28:53 +0530 Subject: [PATCH] Update TC_TSTAT_2_2.py Added test steps 13b and 15b as per the test plan. PR: https://github.com/CHIP-Specifications/chip-test-plans/pull/4630 --- src/python_testing/TC_TSTAT_2_2.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/python_testing/TC_TSTAT_2_2.py b/src/python_testing/TC_TSTAT_2_2.py index f4e1dfbc2b70d3..91caed8c5e40f5 100644 --- a/src/python_testing/TC_TSTAT_2_2.py +++ b/src/python_testing/TC_TSTAT_2_2.py @@ -89,9 +89,11 @@ def steps_TC_TSTAT_2_2(self) -> list[TestStep]: TestStep("11b", "Test Harness Writes the value below MinSetpointDeadBand"), TestStep("11c", "Test Harness Writes the min limit of MinSetpointDeadBand"), TestStep("12", "Test Harness Reads ControlSequenceOfOperation from Server DUT, if TSTAT.S.F01 is true"), - TestStep("13", "Sets OccupiedCoolingSetpoint to default value"), + TestStep("13a", "Sets OccupiedCoolingSetpoint to default value"), + TestStep("13b", "Sets SetpointRaiseLower set to Heat (0x00), and the amount set to 0xE2 (-30 units = -3 degrees)."), TestStep("14", "Sets OccupiedHeatingSetpoint to default value"), - TestStep("15", "Test Harness Sends SetpointRaise Command Cool Only"), + TestStep("15a", "Test Harness Sends SetpointRaise Command Cool Only"), + TestStep("15b", "Sets SetpointRaiseLower set to Cool (0x01), and the amount set to 0xE2 (-30 units = -3 degrees)."), TestStep("16", "Sets OccupiedCoolingSetpoint to default value"), TestStep("17", "Sets OccupiedCoolingSetpoint to default value"), TestStep("18", "Sets OccupiedCoolingSetpoint to default value"), @@ -674,7 +676,7 @@ async def test_TC_TSTAT_2_2(self): if val != ControlSequenceOfOperation: asserts.assert_equal(val, 4) - self.step("13") + self.step("13a") if self.pics_guard(hasCoolingFeature): # Sets OccupiedCoolingSetpoint to default value @@ -691,6 +693,13 @@ async def test_TC_TSTAT_2_2(self): val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint) asserts.assert_equal(val, OccupiedHeatingSetpointValue - 30 * 10) + self.step("13b") + + if self.pics_guard(not hasHeatingFeature): + # Sends SetpointRaise Command Heat Only + await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kHeat, amount=-30), endpoint=endpoint) + asserts.assert_equal(status, Status.InvalidCommand) + self.step("14") if self.pics_guard(hasHeatingFeature): @@ -704,7 +713,7 @@ async def test_TC_TSTAT_2_2(self): val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint) asserts.assert_equal(val, OccupiedHeatingSetpointValue + 30 * 10) - self.step("15") + self.step("15a") if self.pics_guard(hasCoolingFeature): # Test Harness Sends SetpointRaise Command Cool Only @@ -714,6 +723,13 @@ async def test_TC_TSTAT_2_2(self): val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedCoolingSetpoint) asserts.assert_equal(val, OccupiedCoolingSetpointValue - 30 * 10) + self.step("15b") + + if self.pics_guard(not hasCoolingFeature): + # Test Harness Sends SetpointRaise Command Cool Only + await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kCool, amount=-30), endpoint=endpoint) + asserts.assert_equal(status, Status.InvalidCommand) + self.step("16") if self.pics_guard(hasCoolingFeature):