Skip to content

Commit 640ee0e

Browse files
authored
Update TC_TSTAT_2_2.py
Added test steps 13b and 15b as per the test plan. PR: CHIP-Specifications/chip-test-plans#4630
1 parent c3528c4 commit 640ee0e

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/python_testing/TC_TSTAT_2_2.py

+20-4
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ def steps_TC_TSTAT_2_2(self) -> list[TestStep]:
8989
TestStep("11b", "Test Harness Writes the value below MinSetpointDeadBand"),
9090
TestStep("11c", "Test Harness Writes the min limit of MinSetpointDeadBand"),
9191
TestStep("12", "Test Harness Reads ControlSequenceOfOperation from Server DUT, if TSTAT.S.F01 is true"),
92-
TestStep("13", "Sets OccupiedCoolingSetpoint to default value"),
92+
TestStep("13a", "Sets OccupiedCoolingSetpoint to default value"),
93+
TestStep("13b", "Sets SetpointRaiseLower set to Heat (0x00), and the amount set to 0xE2 (-30 units = -3 degrees)."),
9394
TestStep("14", "Sets OccupiedHeatingSetpoint to default value"),
94-
TestStep("15", "Test Harness Sends SetpointRaise Command Cool Only"),
95+
TestStep("15a", "Test Harness Sends SetpointRaise Command Cool Only"),
96+
TestStep("15b", "Sets SetpointRaiseLower set to Cool (0x01), and the amount set to 0xE2 (-30 units = -3 degrees)."),
9597
TestStep("16", "Sets OccupiedCoolingSetpoint to default value"),
9698
TestStep("17", "Sets OccupiedCoolingSetpoint to default value"),
9799
TestStep("18", "Sets OccupiedCoolingSetpoint to default value"),
@@ -674,7 +676,7 @@ async def test_TC_TSTAT_2_2(self):
674676
if val != ControlSequenceOfOperation:
675677
asserts.assert_equal(val, 4)
676678

677-
self.step("13")
679+
self.step("13a")
678680

679681
if self.pics_guard(hasCoolingFeature):
680682
# Sets OccupiedCoolingSetpoint to default value
@@ -691,6 +693,13 @@ async def test_TC_TSTAT_2_2(self):
691693
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
692694
asserts.assert_equal(val, OccupiedHeatingSetpointValue - 30 * 10)
693695

696+
self.step("13b")
697+
698+
if self.pics_guard(not hasHeatingFeature):
699+
# Sends SetpointRaise Command Heat Only
700+
await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kHeat, amount=-30), endpoint=endpoint)
701+
asserts.assert_equal(status, Status.InvalidCommand)
702+
694703
self.step("14")
695704

696705
if self.pics_guard(hasHeatingFeature):
@@ -704,7 +713,7 @@ async def test_TC_TSTAT_2_2(self):
704713
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
705714
asserts.assert_equal(val, OccupiedHeatingSetpointValue + 30 * 10)
706715

707-
self.step("15")
716+
self.step("15a")
708717

709718
if self.pics_guard(hasCoolingFeature):
710719
# Test Harness Sends SetpointRaise Command Cool Only
@@ -714,6 +723,13 @@ async def test_TC_TSTAT_2_2(self):
714723
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedCoolingSetpoint)
715724
asserts.assert_equal(val, OccupiedCoolingSetpointValue - 30 * 10)
716725

726+
self.step("15b")
727+
728+
if self.pics_guard(not hasCoolingFeature):
729+
# Test Harness Sends SetpointRaise Command Cool Only
730+
await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kCool, amount=-30), endpoint=endpoint)
731+
asserts.assert_equal(status, Status.InvalidCommand)
732+
717733
self.step("16")
718734

719735
if self.pics_guard(hasCoolingFeature):

0 commit comments

Comments
 (0)