Skip to content

Commit 1bf16c0

Browse files
committed
Address TP review comments
1 parent c112da3 commit 1bf16c0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/python_testing/TC_CC_2_2.py

+9-11
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def entry_count_verification() -> str:
7272
TestStep(15, verify_entry_count('CurrentSaturation'), entry_count_verification()),
7373
TestStep(16, 'If XY feature is not supported, skip steps 17-21'),
7474
TestStep(
75-
17, f"{THcommand} MoveToColor with _ColorX_ field set to 65279, _ColorY_ set to 65279, _TransitionTime_ field set to 100 and remaining fields set to 0"),
75+
17, f"{THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 100 and remaining fields set to 0"),
7676
TestStep(18, store_values('CurrentX')),
7777
TestStep(19, store_values('CurrentY')),
7878
TestStep(20, verify_entry_count('CurrentX'), entry_count_verification()),
@@ -86,12 +86,12 @@ def entry_count_verification() -> str:
8686
TestStep(
8787
28, f"If HS feature is supported and XY feature is not supported, {THcommand} MoveToHue with _Hue_ field set to 254, _TransitionTime_ field set to 100, _Direction_ field set to Shortest and remaining fields set to 0", verify_success()),
8888
TestStep(
89-
29, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 65279, _ColorY_ set to 65279, _TransitionTime_ field set to 100 and remaining fields set to 0", verify_success()),
89+
29, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 100 and remaining fields set to 0", verify_success()),
9090
TestStep(30, "Wait for 5 seconds"),
9191
TestStep(
9292
31, f"If HS feature is supported and XY feature is not supported, {THcommand} MoveToHue with _Hue_ field set to 254, _TransitionTime_ field set to 150, _Direction_ field set to Shortest and remaining fields set to 0", verify_success()),
9393
TestStep(
94-
32, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 65279, _ColorY_ set to 65279, _TransitionTime_ field set to 150 and remaining fields set to 0", verify_success()),
94+
32, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 150 and remaining fields set to 0", verify_success()),
9595
TestStep(33, "Wait for 20 seconds"),
9696
TestStep(34, "TH verifies _reportedRemainingTimeValuesList_ contains three entries",
9797
"_reportedRemainingTimeValuesList_ has 3 entries in the list"),
@@ -105,9 +105,7 @@ def entry_count_verification() -> str:
105105

106106
@per_endpoint_test(has_cluster(Clusters.ColorControl))
107107
async def test_TC_CC_2_2(self):
108-
# TODO: make configurable for ci?
109-
is_ci = self.check_pics('PICS_SDK_CI_ONLY')
110-
gather_time = 10 if is_ci else 30
108+
gather_time = 20
111109

112110
# commissioning - already done
113111
self.step(1)
@@ -158,8 +156,8 @@ def accumulate_reports():
158156

159157
def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor):
160158
count = sub_handler.attribute_report_counts[attr]
161-
# TODO: Test plan says 10, but I'm pretty sure this is supposed to be 30 since it's not more than once per second
162-
# asserts.assert_less_equal(count, 10, "More than 10 reports received")
159+
# TODO: should be 12 - see issue #34646
160+
# asserts.assert_less_equal(count, 12, "More than 12 reports received")
163161
asserts.assert_less_equal(count, gather_time, f"More than {gather_time} reports received")
164162

165163
self.step(9)
@@ -200,7 +198,7 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor):
200198
self.skip_step(21)
201199
else:
202200
self.step(17)
203-
cmd = cc.Commands.MoveToColor(colorX=65279, colorY=65279, transitionTime=100)
201+
cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=100)
204202
await self.send_single_cmd(cmd)
205203

206204
self.step(18)
@@ -247,7 +245,7 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor):
247245

248246
self.step(29)
249247
if supports_xy and not supports_hs:
250-
cmd = cc.Commands.MoveToColor(colorX=65279, colorY=65279, transitionTime=100)
248+
cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=100)
251249
await self.send_single_cmd(cmd)
252250

253251
self.step(30)
@@ -261,7 +259,7 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor):
261259

262260
self.step(32)
263261
if supports_xy and not supports_hs:
264-
cmd = cc.Commands.MoveToColor(colorX=65279, colorY=65279, transitionTime=150)
262+
cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=150)
265263
await self.send_single_cmd(cmd)
266264

267265
self.step(33)

0 commit comments

Comments
 (0)