Skip to content

Commit 80c28db

Browse files
Added manual step for confirm humnan readable text.
1 parent 87abdf2 commit 80c28db

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/python_testing/TC_MOD_1_2.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# === BEGIN CI TEST ARGUMENTS ===
2222
# test-runner-runs:
2323
# run1:
24-
# app: ALL_CLUSTERS_APP
24+
# app: ${ALL_CLUSTERS_APP}
2525
# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:TRACE_APP.json
2626
# script-args: >
2727
# --storage-path admin_storage.json
@@ -101,6 +101,7 @@ async def test_MOD_1_2(self):
101101
self.cluster = Clusters.ModeSelect
102102
self.endpoint = self.get_endpoint(1)
103103
self._16bitshex = 0xFFFF
104+
self.is_ci = self.check_pics("PICS_SDK_CI_ONLY")
104105

105106
# commision device
106107
# in the test plan step 1 is defined as a precondition.
@@ -148,11 +149,19 @@ async def test_MOD_1_2(self):
148149
asserts.assert_true(isinstance(startup_mode, int), "Startupmode is not int")
149150
asserts.assert_in(startup_mode, supported_modes_values, f"Startupmode {current_mode} is not in {supported_modes_values}")
150151

151-
# string and readable
152+
# Verify the string for ci is larger that 1 char.
153+
# If is non ci ask the user if can read and understand the string.
152154
self.step(6)
153155
description = await self.read_single_attribute_check_success(endpoint=1, cluster=self.cluster, attribute=self.cluster.Attributes.Description)
154156
self._log_attribute("Description", description)
155-
asserts.assert_true(isinstance(description, str), "Description attribute is not instance of str")
157+
if self.is_ci:
158+
asserts.assert_true(isinstance(description, str), "Description attribute is not str")
159+
asserts.assert_true(len(description) >= 1, "Description is lower that 1 char.")
160+
else:
161+
user_response = self.wait_for_user_input(prompt_msg=f"Is the value \"{description}\" for attribute Description a readable and understandable string? Enter 'y' or 'n'",
162+
prompt_msg_placeholder="y",
163+
default_value="y")
164+
asserts.assert_true(user_response.lower() == 'y', f"The description is not understandable to the user.")
156165

157166
# Verify the StandardNamespace can be 16bits integer or null
158167
self.step(7)

0 commit comments

Comments
 (0)