@@ -98,7 +98,7 @@ async def send_cmd_skip_area_expect_response(self, step, skipped_area, expected_
98
98
f"Command response ({ ret .status } ) doesn't match the expected one" )
99
99
100
100
def TC_SEAR_1_5 (self ) -> list [str ]:
101
- return ["SEAR.S" , "SEAR.S.C02.Rsp" ]
101
+ return ["SEAR.S" ]
102
102
103
103
@async_test_body
104
104
async def test_TC_SEAR_1_5 (self ):
@@ -111,6 +111,14 @@ async def test_TC_SEAR_1_5(self):
111
111
asserts .fail ("The --app-pid flag must be set when PICS_SDK_CI_ONLY is set" )
112
112
self .app_pipe = self .app_pipe + str (app_pid )
113
113
114
+ attribute_list = await self .read_sear_attribute_expect_success (
115
+ endpoint = self .endpoint , attribute = Clusters .ServiceArea .Attributes .AttributeList )
116
+ accepted_cmd_list = await self .read_sear_attribute_expect_success (
117
+ endpoint = self .endpoint , attribute = Clusters .ServiceArea .Attributes .AcceptedCommandList )
118
+
119
+ if Clusters .ServiceArea .Commands .SkipArea .command_id not in accepted_cmd_list :
120
+ asserts .fail ("Skip Area Response command needs to be supported to run this test" )
121
+
114
122
self .print_step (1 , "Commissioning, already done" )
115
123
116
124
# Ensure that the device is in the correct state
@@ -167,15 +175,15 @@ async def test_TC_SEAR_1_5(self):
167
175
if not self .check_pics ("SEAR.S.M.VALID_STATE_FOR_SKIP" ):
168
176
return
169
177
170
- if self . check_pics ( "SEAR.S.A0005" ) :
178
+ if Clusters . ServiceArea . Attributes . Progress . attribute_id in attribute_list :
171
179
old_progress_list = await self .read_progress (step = 9 )
172
180
asserts .assert_true (len (old_progress_list ) > 0 , f"len of Progress({ len (old_progress_list )} ) should not be zero)" )
173
181
174
182
selected_areas = await self .read_selected_areas (step = 10 )
175
183
asserts .assert_true (len (selected_areas ) > 0 , "SelectedAreas is empty" )
176
184
177
185
old_current_area = NullValue
178
- if self . check_pics ( "SEAR.S.A0003" ) :
186
+ if Clusters . ServiceArea . Attributes . CurrentArea . attribute_id in attribute_list :
179
187
old_current_area = await self .read_current_area (step = 11 )
180
188
181
189
self .print_step ("12" , "" )
@@ -189,7 +197,7 @@ async def test_TC_SEAR_1_5(self):
189
197
if not self .is_ci :
190
198
self .wait_for_user_input (prompt_msg = f"{ test_step } , and press Enter when done.\n " )
191
199
192
- if self . check_pics ( "SEAR.S.A0005" ) :
200
+ if Clusters . ServiceArea . Attributes . Progress . attribute_id in attribute_list :
193
201
new_progress_list = await self .read_progress (step = 15 )
194
202
asserts .assert_true (len (new_progress_list ) > 0 ,
195
203
f"len of Progress({ len (new_progress_list )} ) should not be zero)" )
@@ -230,7 +238,7 @@ async def test_TC_SEAR_1_5(self):
230
238
self .print_step ("17" , "" )
231
239
return
232
240
233
- if not self . check_pics ( "SEAR.S.A0005" ) :
241
+ if Clusters . ServiceArea . Attributes . Progress . attribute_id not in attribute_list :
234
242
return
235
243
236
244
if self .check_pics ("SEAR.S.M.HAS_MANUAL_SKIP_STATE_CONTROL" ):
0 commit comments