Skip to content

Commit

Permalink
fix issue introduced by the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
plauric committed Jul 29, 2024
1 parent 9113ade commit 6ae583d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/python_testing/TC_SEAR_1_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,35 +115,35 @@ async def test_TC_SEAR_1_3(self):
duplicated_areas = [valid_area_id, valid_area_id]

#FIXME need to check if this is the correct name of this status code
await self.send_cmd_select_areas_expect_response(step=3, duplicated_areas, Clusters.ServiceArea.SelectAreasStatus.kDuplicatedAreas)
await self.send_cmd_select_areas_expect_response(step=3, new_areas=duplicated_areas, expected_response=Clusters.ServiceArea.SelectAreasStatus.kDuplicatedAreas)

await self.send_cmd_select_areas_expect_response(step=4, [], Clusters.ServiceArea.SelectAreasStatus.kSuccess)
await self.send_cmd_select_areas_expect_response(step=4, new_areas=[], expected_response=Clusters.ServiceArea.SelectAreasStatus.kSuccess)

selected_areas = await self.read_selected_areas(step=5)
asserts.assert_true(len(selected_areas) == 0, "SelectedAreas should be empty")

await self.send_cmd_select_areas_expect_response(step=6, [invalid_area_id], Clusters.ServiceArea.SelectAreasStatus.kUnsupportedArea)
await self.send_cmd_select_areas_expect_response(step=6, new_areas=[invalid_area_id], expected_response=Clusters.ServiceArea.SelectAreasStatus.kUnsupportedArea)

if self.check_pics("SEAR.S.M.INVALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL"):
test_step = "Manually intervene to put the device in a state that prevents it from executing the SelectAreas command"
self.print_step("7", test_step)
if not self.is_ci:
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

await self.send_cmd_select_areas_expect_response(step=8, [valid_area_id], Clusters.ServiceArea.SelectAreasStatus.kInvalidInMode)
await self.send_cmd_select_areas_expect_response(step=8, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.SelectAreasStatus.kInvalidInMode)

if self.check_pics("SEAR.S.M.VALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL"):
test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({supported_area_ids}) command"
self.print_step("9", test_step)
if not self.is_ci:
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

await self.send_cmd_select_areas_expect_response(step=10, supported_area_ids, Clusters.ServiceArea.SelectAreasStatus.kSuccess)
await self.send_cmd_select_areas_expect_response(step=10, new_areas=supported_area_ids, expected_response=Clusters.ServiceArea.SelectAreasStatus.kSuccess)

selected_areas = await self.read_selected_areas(step=11)
asserts.assert_true(len(selected_areas) == len(supported_area_ids), f"SelectedAreas({selected_areas}) should match SupportedAreas({supported_area_ids})")

await self.send_cmd_select_areas_expect_response(step=12, supported_area_ids, Clusters.ServiceArea.SelectAreasStatus.kSuccess)
await self.send_cmd_select_areas_expect_response(step=12, new_areas=supported_area_ids, expected_response=Clusters.ServiceArea.SelectAreasStatus.kSuccess)

if self.check_pics("SEAR.S.M.VALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL") and self.check_pics("SEAR.S.M.SELECT_AREAS_WHILE_NON_IDLE"):
test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({valid_area_id}) command, and put the device in a non-idle state"
Expand All @@ -152,9 +152,9 @@ async def test_TC_SEAR_1_3(self):
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

if self.check_pics("SEAR.S.F00"):
await self.send_cmd_select_areas_expect_response(step=14, [valid_area_id], Clusters.ServiceArea.SelectAreasStatus.kSuccess)
await self.send_cmd_select_areas_expect_response(step=14, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.SelectAreasStatus.kSuccess)
else:
await self.send_cmd_select_areas_expect_response(step=14, [valid_area_id], Clusters.ServiceArea.SelectAreasStatus.kInvalidInMode)
await self.send_cmd_select_areas_expect_response(step=14, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.SelectAreasStatus.kInvalidInMode)



Expand Down
10 changes: 5 additions & 5 deletions src/python_testing/TC_SEAR_1_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def test_TC_SEAR_1_5(self):
if not self.is_ci:
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

await self.send_cmd_skip_area_expect_response(step=4, valid_area_id, Clusters.ServiceArea.SkipAreaStatus.kInvalidInMode)
await self.send_cmd_skip_area_expect_response(step=4, skipped_area=valid_area_id, expected_response=Clusters.ServiceArea.SkipAreaStatus.kInvalidInMode)

if self.check_pics("SEAR.S.M.NO_SELAREA_FOR_SKIP") and self.check_pics("SEAR.S.M.HAS_MANUAL_SKIP_STATE_CONTROL"):
test_step = "Manually intervene to put the device in a state where the state would allow it to execute the SkipArea command, \
Expand All @@ -144,15 +144,15 @@ async def test_TC_SEAR_1_5(self):
if not self.is_ci:
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

await self.send_cmd_skip_area_expect_response(step=6, valid_area_id, Clusters.ServiceArea.SkipAreaStatus.kInvalidAreaList)
await self.send_cmd_skip_area_expect_response(step=6, skipped_area=valid_area_id, expected_response=Clusters.ServiceArea.SkipAreaStatus.kInvalidAreaList)

if self.check_pics("SEAR.S.M.VALID_STATE_FOR_SKIP") and self.check_pics("SEAR.S.M.HAS_MANUAL_SKIP_STATE_CONTROL"):
test_step = "Manually intervene to put the device in a state that allows it to execute the SkipArea command"
self.print_step("7", test_step)
if not self.is_ci:
self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n")

await self.send_cmd_skip_area_expect_response(step=8, invalid_area_id, Clusters.ServiceArea.SkipAreaStatus.kInvalidSkippedArea)
await self.send_cmd_skip_area_expect_response(step=8, skipped_area=invalid_area_id, expected_response=Clusters.ServiceArea.SkipAreaStatus.kInvalidSkippedArea)

if self.check_pics("SEAR.S.A0005"):
old_progress_list = await self.read_progress(step=9)
Expand All @@ -167,7 +167,7 @@ async def test_TC_SEAR_1_5(self):

self.print_step("12", "")
if old_current_area is not NullValue:
await self.send_cmd_skip_area_expect_response(step=13, old_current_area, Clusters.ServiceArea.SkipAreaStatus.kSuccess)
await self.send_cmd_skip_area_expect_response(step=13, skipped_area=old_current_area, expected_response=Clusters.ServiceArea.SkipAreaStatus.kSuccess)

test_step = "(Manual operation) wait for the device to skip the current area, and start operating at\
the next one it should process, or stop operating"
Expand Down Expand Up @@ -234,7 +234,7 @@ async def test_TC_SEAR_1_5(self):
if area_to_skip is NullValue:
return

await self.send_cmd_skip_area_expect_response(step=21, area_to_skip, Clusters.ServiceArea.SkipAreaStatus.kSuccess)
await self.send_cmd_skip_area_expect_response(step=21, skipped_area=area_to_skip, expected_response=Clusters.ServiceArea.SkipAreaStatus.kSuccess)

test_step = "(Manual operation) wait for the device to update Progress or to stop operating"
self.print_step("22", test_step)
Expand Down

0 comments on commit 6ae583d

Please sign in to comment.