Skip to content

Commit 15032f1

Browse files
Minimal TC_SWTCH fixes for 1.4-TE2 (#34986)
- Fixes only issues raised on script that block success - project-chip/matter-test-scripts#337 - project-chip/matter-test-scripts#338 - Fixes done: - Prompt text improvement/fixes - Fixed crash in 2.5/2.6
1 parent bbc773a commit 15032f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/python_testing/TC_SWTCH.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _ask_for_switch_position(self, endpoint_id: int, new_position: int):
114114
def _ask_for_multi_press_short_long(self, endpoint_id: int, pressed_position: int, feature_map: uint, multi_press_max: uint):
115115
if not self._use_button_simulator():
116116
msg = f"""
117-
Actuate the switch in the following sequence:
117+
Actuate the switch in the following sequence (read full sequence first):
118118
1. Operate switch (press briefly) associated with position {pressed_position} on the DUT then release switch from DUT
119119
2. Operate switch (keep pressed for long time, e.g. 5 seconds) on the DUT immediately after the previous step
120120
3. Release switch from the DUT
@@ -128,7 +128,7 @@ def _ask_for_multi_press_short_long(self, endpoint_id: int, pressed_position: in
128128
def _ask_for_multi_press_long_short(self, endpoint_id, pressed_position, feature_map: int):
129129
if not self._use_button_simulator():
130130
msg = f"""
131-
Actuate the switch in the following sequence:
131+
Actuate the switch in the following sequence (read full sequence first):
132132
1. Operate switch (keep pressed for long time, e.g. 5 seconds) on the DUT
133133
2. Releases switch from the DUT
134134
3. Immediately after the previous step completes, operate switch (press briefly) associated with position {pressed_position} on the DUT then release switch from DUT
@@ -142,7 +142,7 @@ def _ask_for_multi_press_long_short(self, endpoint_id, pressed_position, feature
142142
def _ask_for_multi_press(self, endpoint_id: int, number_of_presses: int, pressed_position: int, feature_map: uint, multi_press_max: uint):
143143
if not self._use_button_simulator():
144144
self.wait_for_user_input(
145-
f'Operate the switch (press briefly) associated with position {pressed_position} then release {number_of_presses} times')
145+
f'Execute {number_of_presses} separate brief press/release cycles on position {pressed_position}.')
146146
else:
147147
self._send_multi_press_named_pipe_command(endpoint_id, number_of_presses,
148148
pressed_position, feature_map, multi_press_max)
@@ -157,7 +157,7 @@ def _ask_for_long_press(self, endpoint_id: int, pressed_position: int, feature_m
157157
def _ask_for_keep_pressed(self, endpoint_id: int, pressed_position: int, feature_map: int):
158158
if not self._use_button_simulator():
159159
self.wait_for_user_input(
160-
prompt_msg=f"Press switch position {pressed_position} for a long time (around 5 seconds) on the DUT, then release it.")
160+
prompt_msg=f"Press switch position {pressed_position} for a long time (around 5 seconds) on the DUT, keep it pressed, do NOT release it.")
161161
else:
162162
self._send_long_press_named_pipe_command(endpoint_id, pressed_position, feature_map)
163163

@@ -676,7 +676,7 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool =
676676
asserts.assert_equal(event.newPosition, pressed_position, "Unexpected NewPosition on LongPress")
677677
event = event_listener.wait_for_event_report(cluster.Events.LongRelease)
678678
asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on LongRelease")
679-
if self._use_button_simulator:
679+
if self._use_button_simulator():
680680
# simulator can't sequence so we need to help it along here
681681
self._send_multi_press_named_pipe_command(endpoint_id, number_of_presses=1,
682682
pressed_position=1, feature_map=feature_map, multi_press_max=multi_press_max)
@@ -839,7 +839,7 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool =
839839
asserts.assert_equal(event.newPosition, pressed_position, "Unexpected NewPosition on LongPress")
840840
event = event_listener.wait_for_event_report(cluster.Events.LongRelease)
841841
asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on LongRelease")
842-
if self._use_button_simulator:
842+
if self._use_button_simulator():
843843
# simulator can't sequence so we need to help it along here
844844
self._send_multi_press_named_pipe_command(endpoint_id, number_of_presses=1,
845845
pressed_position=1, feature_map=feature_map, multi_press_max=multi_press_max)

0 commit comments

Comments
 (0)