blob: 0f9b719f22b79a063b7e74ff4014dee5d4718bbe [file] [log] [blame]
Anthony DiGirolamo46440992021-07-19 16:07:47 -07001.. _module-pw_console-testing:
2
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -08003=====================
Anthony DiGirolamo46440992021-07-19 16:07:47 -07004Manual Test Procedure
5=====================
6
7``pw_console`` is a Terminal based user interface which is difficult to
8completely test in an automated fashion. Unit tests that don't depend on the
9user interface are preferred but not always possible. For those situations
10manual tests should be added here to validate expected behavior.
11
Anthony DiGirolamo54db7652021-07-28 11:14:24 -070012Run in Test Mode
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -080013================
Anthony DiGirolamo46440992021-07-19 16:07:47 -070014
Anthony DiGirolamo54db7652021-07-28 11:14:24 -070015Begin each section below by running the console in test mode:
Anthony DiGirolamo46440992021-07-19 16:07:47 -070016
17.. code-block:: shell
18
Anthony DiGirolamodbdd3462022-03-05 17:14:36 -080019 touch /tmp/empty.yaml
20 env PW_CONSOLE_CONFIG_FILE='/tmp/empty.yaml' pw console --test-mode
Anthony DiGirolamo46440992021-07-19 16:07:47 -070021
Anthony DiGirolamo54db7652021-07-28 11:14:24 -070022Test Sections
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -080023=============
Anthony DiGirolamo54db7652021-07-28 11:14:24 -070024
25Log Pane: Basic Actions
26^^^^^^^^^^^^^^^^^^^^^^^
Anthony DiGirolamo46440992021-07-19 16:07:47 -070027
28.. list-table::
29 :widths: 5 45 45 5
30 :header-rows: 1
31
32 * - #
33 - Test Action
34 - Expected Result
35 - ✅
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070036
Anthony DiGirolamo46440992021-07-19 16:07:47 -070037 * - 1
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080038 - Click the :guilabel:`Fake Device Logs` window title
Anthony DiGirolamo46440992021-07-19 16:07:47 -070039 - Log pane is focused
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070040 - |checkbox|
41
Anthony DiGirolamo46440992021-07-19 16:07:47 -070042 * - 2
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080043 - In the main menu enable :guilabel:`[File] > Log Table View > Hide Date`
44 - The time column shows only the time. E.g. ``09:34:53``.
45 - |checkbox|
46
47 * - 3
48 - In the main menu turn off :guilabel:`[File] > Log Table View > Hide Date`
49 - The time column shows the date and time. E.g. ``20220208 09:34:53``.
50 - |checkbox|
51
52 * - 4
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080053 - Click :guilabel:`Search` on the log toolbar
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070054 - | The search bar appears
55 | The cursor should appear after the ``/``
56 - |checkbox|
57
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080058 * - 5
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080059 - Press :kbd:`Ctrl-c`
Anthony DiGirolamo46440992021-07-19 16:07:47 -070060 - The search bar disappears
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070061 - |checkbox|
62
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080063 * - 6
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080064 - Click :guilabel:`Follow` on the log toolbar
Anthony DiGirolamo46440992021-07-19 16:07:47 -070065 - Logs stop following
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070066 - |checkbox|
67
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080068 * - 7
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080069 - Click :guilabel:`Table` on the log toolbar
Anthony DiGirolamo46440992021-07-19 16:07:47 -070070 - Table mode is disabled
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070071 - |checkbox|
72
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080073 * - 8
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080074 - Click :guilabel:`Wrap` on the log toolbar
Anthony DiGirolamo46440992021-07-19 16:07:47 -070075 - Line wrapping is enabled
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -070076 - |checkbox|
77
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080078 * - 9
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080079 - Click :guilabel:`Clear` on the log toolbar
Anthony DiGirolamo8577f742021-08-06 11:33:42 -070080 - | All log lines are erased
81 | Follow mode is on
82 | New lines start appearing
83 - |checkbox|
84
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080085 * - 10
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080086 - | Mouse drag across a few log messages
87 - | Entire logs are highlighted and a dialog
88 | box appears in the upper right
89 - |checkbox|
90
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080091 * - 11
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080092 - | Without scrolling mouse drag across a set
93 | of different log messages.
94 - | The old selection disappears leaving only the new selection.
95 - |checkbox|
96
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -080097 * - 12
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -080098 - | Click the :guilabel:`Cancel` button
99 | in the selection dialog box.
100 - | The selection and the dialog box disappears.
101 - |checkbox|
102
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -0800103 * - 13
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800104 - | Mouse drag across a few log messages and
105 | click the :guilabel:`Save as File` button.
106 - | The save as file dialog appears with the
107 | :guilabel:`[x] Selected Lines Only` opion checked.
108 - |checkbox|
109
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -0800110 * - 14
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800111 - | Press :kbd:`Cancel`
112 - | The save dialog closes
113 - |checkbox|
114
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -0800115 * - 15
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800116 - | Click the :guilabel:`Save` button on the log toolbar.
117 | A dialog appears prompting for a file.
118 - | The current working directory should be pre-filled.
119 - |checkbox|
120
Anthony DiGirolamodec8d5e2022-02-08 08:58:57 -0800121 * - 16
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800122 - | Check :guilabel:`[x] Table Formatting`
123 | Uncheck :guilabel:`[ ] Selected Lines Only`
124 | Add ``/log.txt`` to the end and press :kbd:`Enter`
125 | Click the menu :guilabel:`[File] > Exit`
126 - | In the terminal run ``cat log.txt`` to verify logs
127 | were saved correctly.
128 - |checkbox|
129
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700130Log Pane: Search and Filtering
131^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700132
133.. list-table::
134 :widths: 5 45 45 5
135 :header-rows: 1
136
137 * - #
138 - Test Action
139 - Expected Result
140 - ✅
141
142 * - 1
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800143 - Click the :guilabel:`Fake Device Logs` window title
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700144 - Log pane is focused
145 - |checkbox|
146
147 * - 2
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800148 - Press :kbd:`/`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700149 - | The search bar appears
150 | The cursor should appear after the ``/``
151 - |checkbox|
152
153 * - 3
154 - | Type ``lorem``
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800155 | Press :kbd:`Enter`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700156 - | Logs stop following
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800157 | ``Lorem`` words are highlighted in cyan
158 | The cursor on the first log message
159 | The search toolbar is un-focused and displays:
160 | ``Match 1 / 10`` where the second number (the total match count)
161 | increases once every 10 seconds when new logs arrive.
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700162 - |checkbox|
163
164 * - 4
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800165 - Press :kbd:`Ctrl-f`
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800166 - | The search bar is focused
167 | The cursor should appear after ``/Lorem``
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700168 - |checkbox|
169
170 * - 5
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800171 - Press :kbd:`Ctrl-c`
172 - | The search bar disappears
173 | ``Lorem`` words are no longer highlighted
174 - |checkbox|
175
176 * - 6
177 - Press :kbd:`/`
178 - | The search bar appears and is empty
179 | The cursor should appear after ``/``
180 - |checkbox|
181
182 * - 7
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800183 - Click :guilabel:`Matcher:` once
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700184 - ``Matcher:STRING`` is shown
185 - |checkbox|
186
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800187 * - 8
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700188 - | Type ``[=``
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800189 | Press :kbd:`Enter`
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800190 - | All instances of ``[=`` should be highlighted
191 | The cursor should be on log message 2
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700192 - |checkbox|
193
194 * - 7
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800195 - Press :kbd:`/`
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800196 - | The search bar is focused
197 | The cursor should appear after the ``/[=``
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700198 - |checkbox|
199
200 * - 8
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800201 - Press :kbd:`Ctrl-c`
202 - | The search bar disappears
203 | ``[=`` matches are no longer highlighted
204 - |checkbox|
205
206 * - 9
207 - Press :kbd:`/`
208 - | The search bar appears and is empty
209 | The cursor should appear after ``/``
210 - |checkbox|
211
212 * - 10
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800213 - Press :kbd:`Up`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700214 - The text ``[=`` should appear in the search input field
215 - |checkbox|
216
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800217 * - 11
218 - Click :guilabel:`Search Enter`
219 - | All instances of ``[=`` should be highlighted
220 | The cursor should be on log message 12
221 - |checkbox|
222
223 * - 12
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800224 - Click :guilabel:`Add Filter`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700225 - | A ``Filters`` toolbar will appear
226 | showing the new filter: ``<\[= (X)>``.
227 | Only log messages matching ``[=`` appear in the logs.
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800228 | Follow mode is enabled
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700229 - |checkbox|
230
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800231 * - 13
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800232 - | Press :kbd:`/`
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800233 - | The search bar appears and is empty
234 | The cursor should appear after ``/``
235 - |checkbox|
236
237 * - 14
238 - | Type ``# 1`` and press :kbd:`Enter`
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800239 | Click :guilabel:`Add Filter`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700240 - | The ``Filters`` toolbar shows a new filter: ``<\#\ 1 (X)>``.
241 | Only log messages matching both filters will appear in the logs.
242 - |checkbox|
243
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800244 * - 15
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800245 - | Click the first :guilabel:`(X)`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700246 | in the filter toolbar.
247 - | The ``Filters`` toolbar shows only one filter: ``<\#\ 1 (X)>``.
248 | More log messages will appear in the log window
249 | Lines all end in: ``# 1.*``
250 - |checkbox|
251
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800252 * - 16
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800253 - Click :guilabel:`Clear Filters`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700254 - | The ``Filters`` toolbar will disappear.
255 | All log messages will be shown in the log window.
256 - |checkbox|
257
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800258 * - 17
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800259 - | Press :kbd:`/`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700260 | Type ``BAT``
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800261 | Click :guilabel:`Column` until ``Column:Module`` is shown
262 | Press :kbd:`Enter`
263 - | Logs stop following
264 | ``BAT`` is highlighted in cyan
265 | The cursor on the 3rd log message
266 | The search toolbar is un-focused and displays:
267 | ``Match 1 / 10`` where the second number (the total match count)
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700268 - |checkbox|
269
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800270 * - 18
271 - Press :kbd:`n`
272 - | ``BAT`` is highlighted in cyan
273 | The cursor on the 7th log message and is in the center of the
274 | log window (not the bottom).
275 - |checkbox|
276
277 * - 19
278 - Click :guilabel:`Jump to new matches`
279 - | :guilabel:`Jump to new matches` is checked and every 5 seconds
280 | the cursor jumps to the latest matching log message.
281 - |checkbox|
282
283 * - 20
284 - Click :guilabel:`Follow`
285 - | :guilabel:`Jump to new matches` is unchecked
286 | The cursor jumps to every new log message once a second.
287 - |checkbox|
288
289 * - 21
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800290 - | Click :guilabel:`Add Filter`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700291 - | The Filters toolbar appears with one filter: ``<module BAT (X)>``
292 | Only logs with Module matching ``BAT`` appear.
293 - |checkbox|
294
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800295 * - 22
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800296 - Click :guilabel:`Clear Filters`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700297 - | The ``Filters`` toolbar will disappear.
298 | All log messages will be shown in the log window.
299 - |checkbox|
300
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800301 * - 23
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800302 - | Press :kbd:`/`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700303 | Type ``BAT``
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800304 | Click :guilabel:`Invert`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700305 - ``[x] Invert`` setting is shown
306 - |checkbox|
307
Anthony DiGirolamo888d5a42022-02-06 11:37:54 -0800308 * - 24
309 - | Press :kbd:`Enter` then click :guilabel:`Add Filter`
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700310 - | The Filters toolbar appears
311 | One filter is shown: ``<NOT module BAT (X)>``
312 | Only logs with Modules other than ``BAT`` appear.
313 - |checkbox|
Anthony DiGirolamo46440992021-07-19 16:07:47 -0700314
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700315Help Windows
316^^^^^^^^^^^^
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700317
318.. list-table::
319 :widths: 5 45 45 5
320 :header-rows: 1
321
322 * - #
323 - Test Action
324 - Expected Result
325 - ✅
326
327 * - 1
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800328 - Click the :guilabel:`[Help] > User Guide`
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700329 - | Window appears showing the user guide with
330 | RST formatting and syntax highlighting
331 - |checkbox|
332
333 * - 2
334 - Press :guilabel:`q`
335 - Window is hidden
336 - |checkbox|
337
338 * - 3
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800339 - Click the :guilabel:`[Help] > Keyboard Shortcuts`
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700340 - Window appears showing the keybind list
341 - |checkbox|
342
343 * - 4
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800344 - Press :kbd:`F1`
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700345 - Window is hidden
346 - |checkbox|
347
348 * - 5
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800349 - Click the :guilabel:`[Help] > Console Test Mode Help`
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700350 - | Window appears showing help with content
351 | ``Welcome to the Pigweed Console Test Mode!``
352 - |checkbox|
353
354 * - 6
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800355 - Click the :guilabel:`Close q` button.
Anthony DiGirolamo546619f2021-07-22 17:44:04 -0700356 - Window is hidden
357 - |checkbox|
358
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700359Window Management
360^^^^^^^^^^^^^^^^^
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700361
362.. list-table::
363 :widths: 5 45 45 5
364 :header-rows: 1
365
366 * - #
367 - Test Action
368 - Expected Result
369 - ✅
370
371 * - 1
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800372 - | Click the :guilabel:`Fake Device Logs` window title
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700373 - Log pane is focused
374 - |checkbox|
375
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700376 * - 2
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800377 - | Click the menu :guilabel:`Windows > #: Fake Device Logs...`
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700378 | Click :guilabel:`Duplicate pane`
379 - | 3 panes are visible:
380 | Log pane on top
381 | Repl pane in the middle
382 | Log pane on the bottom
383 - |checkbox|
384
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700385 * - 3
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700386 - | Click the :guilabel:`Python Input` window title
387 - Python Input pane is focused
388 - |checkbox|
389
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700390 * - 4
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700391 - Click the :guilabel:`View > Move Window Down`
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700392 - | 3 panes are visible:
393 | Log pane on top
394 | Log pane in the middle
395 | Repl pane on the bottom
396 - |checkbox|
397
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700398 * - 5
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700399 - Click the :guilabel:`View > Move Window Down` again
400 - | Nothing changes
401 | Windows remain in the same order
402 - |checkbox|
403
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700404 * - 6
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700405 - Click the :guilabel:`View > Move Window Up`
406 - | 3 panes are visible:
407 | Log pane on top
408 | Repl pane in the middle
409 | Log pane on the bottom
410 - |checkbox|
411
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700412 * - 7
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800413 - | Click the menu :guilabel:`Windows > #: Fake Device Logs...`
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700414 | Click :guilabel:`Remove pane`
415 - | 2 panes are visible:
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700416 | Repl pane on the top
417 | Log pane on bottom
418 - |checkbox|
419
420 * - 8
421 - | Click the :guilabel:`Python Input`
422 | window title
423 - Repl pane is focused
424 - |checkbox|
425
426 * - 9
427 - | Hold the keys :guilabel:`Alt- -`
428 | `Alt` and `Minus`
429 - Repl pane shrinks
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700430 - |checkbox|
431
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700432 * - 10
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700433 - Hold the keys :guilabel:`Alt-=`
434 - Repl pane enlarges
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700435 - |checkbox|
436
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700437 * - 11
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700438 - | Click the menu :guilabel:`Windows > 1: Logs fake_device.1`
439 | Click :guilabel:`Duplicate pane`
440 - | 3 panes are visible:
441 | 2 Log panes on the left
442 | Repl pane on the right
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700443 - |checkbox|
444
Anthony DiGirolamo21fd9bb2021-07-28 09:45:33 -0700445 * - 12
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700446 - | Click the left top :guilabel:`Logs` window title
447 - Log pane is focused
Anthony DiGirolamofcf278d2021-07-27 19:55:39 -0700448 - |checkbox|
449
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700450 * - 13
451 - Click the :guilabel:`View > Move Window Right`
452 - | 3 panes are visible:
453 | 1 Log panes on the left
454 | 1 Log and Repl pane on the right
455 - |checkbox|
456
457 * - 14
458 - | Click the menu :guilabel:`Windows > Column 2 View Modes`
459 | Then click :guilabel:`[ ] Tabbed Windows`
460 - | 2 panes are visible:
461 | 1 Log panes on the left
462 | 1 Log panes on the right
463 | A tab bar on the top of the right side
464 | `Logs fake_device.1` is highlighted
465 - |checkbox|
466
467 * - 15
468 - | On the right side tab bar
469 | Click :guilabel:`Python Repl`
470 - | 2 panes are visible:
471 | 1 Log pane on the left
472 | 1 Repl pane on the right
473 | `Python Repl` is highlighted
474 | on the tab bar
475 - |checkbox|
476
Anthony DiGirolamo68a91502021-11-14 12:42:38 -0800477Mouse Window Resizing
478^^^^^^^^^^^^^^^^^^^^^
479
480.. list-table::
481 :widths: 5 45 45 5
482 :header-rows: 1
483
484 * - #
485 - Test Action
486 - Expected Result
487 - ✅
488
489 * - 1
490 - | Click the :guilabel:`Fake Device Logs` window
491 - Log pane is focused
492 - |checkbox|
493
494 * - 2
Anthony DiGirolamodbdd3462022-03-05 17:14:36 -0800495 - | Left click and hold the :guilabel:`-==-` of that window
Anthony DiGirolamo68a91502021-11-14 12:42:38 -0800496 | Drag the mouse up and down
497 - This log pane is resized
498 - |checkbox|
499
500 * - 3
Anthony DiGirolamodbdd3462022-03-05 17:14:36 -0800501 - | Left click and hold the :guilabel:`-==-`
Anthony DiGirolamo68a91502021-11-14 12:42:38 -0800502 | of the :guilabel:`PwConsole Debug` window
503 | Drag the mouse up and down
504 - | The :guilabel:`PwConsole Debug` should NOT be focused
505 | The window should be resized as expected
506 - |checkbox|
507
Anthony DiGirolamodbdd3462022-03-05 17:14:36 -0800508 * - 4
509 - Click the :guilabel:`View > Move Window Right`
510 - :guilabel:`Fake Device Logs` should appear in a right side split
511 - |checkbox|
512
513 * - 5
514 - | Left click and hold anywhere on the vertical separator
515 | Drag the mouse left and right
516 - | The window splits should be resized as expected
517 - |checkbox|
518
519 * - 6
520 - Click the :guilabel:`View > Balance Window Sizes`
521 - Window split sizes should reset to equal widths
522 - |checkbox|
523
524 * - 7
525 - | Focus on the :guilabel:`Python Repl` window
526 | Click the :guilabel:`View > Move Window Left`
527 - | :guilabel:`Python Repl` should appear in a left side split
528 | There should be 3 vertical splits in total
529 - |checkbox|
530
531 * - 8
532 - | Left click and hold anywhere on the vertical separator
533 | between the first two splits (Python Repl and the middle split)
534 | Drag the mouse left and right
535 - | The first two window splits should be resized.
536 | The 3rd split size should not change.
537 - |checkbox|
538
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700539Copy Paste
540^^^^^^^^^^
541
542.. list-table::
543 :widths: 5 45 45 5
544 :header-rows: 1
545
546 * - #
547 - Test Action
548 - Expected Result
549 - ✅
550
551 * - 1
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800552 - | Click the :guilabel:`Fake Device Logs` window title
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700553 - Log pane is focused
554 - |checkbox|
555
556 * - 2
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800557 - | Mouse drag across a few log messages
558 - | A dialog appears in the upper right showing
559 | the number of lines selected and
560 | buttons for :guilabel:`Cancel`, :guilabel:`Select All`,
561 | :guilabel:`Save as File`, and :guilabel:`Copy`.
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700562 - |checkbox|
563
564 * - 3
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800565 - | Click the :guilabel:`Copy` button
566 - | Try pasting into a separate text editor
567 | Log lines like this should be pasted:
568 | ``20:07:25 INF APP Log message [ = ] # 25``
569 | ``20:07:25 INF RADIO Log message [ = ] # 26``
570 - |checkbox|
571
572 * - 4
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700573 - | Copy this text in your browser or
574 | text editor to the system clipboard:
575 | ``print('copy paste test!')``
576 - | Click the :guilabel:`Python Input` window title
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800577 | Press :kbd:`Ctrl-v`
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700578 | ``print('copy paste test!')`` appears
579 | after the prompt.
580 - |checkbox|
581
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800582 * - 5
583 - Press :kbd:`Enter`
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700584 - | This appears in Python Results:
585 | ``In [1]: print('copy paste test!')``
586 | ``copy paste test!``
587 - |checkbox|
588
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800589 * - 6
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700590 - | Click :guilabel:`Ctrl-Alt-c -> Copy Output`
591 | on the Python Results toolbar
592 | Try pasting into a separate text editor
593 - | The contents of the Python Results
594 | are in the system clipboard.
595 - |checkbox|
596
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800597 * - 7
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700598 - Click the :guilabel:`Python Results` window title
599 - | Python Results is focused with cursor
600 | appearing below the last line
601 - |checkbox|
602
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800603 * - 8
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700604 - | Click and drag over ``copy paste text``
605 | highlighting won't appear until
606 | after the mouse button is released
607 - | ``copy paste text`` is highlighted
608 - |checkbox|
609
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800610 * - 9
611 - | Press :kbd:`Ctrl-c`
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700612 | Try pasting into a separate text editor
613 - | ``copy paste text`` should appear (and is
614 | in the system clipboard)
615 - |checkbox|
616
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800617 * - 10
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700618 - Click the :guilabel:`Python Input` window title
619 - Python Input is focused
620 - |checkbox|
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700621
Anthony DiGirolamoabe736a2022-03-07 14:20:08 -0800622 * - 11
623 - | Type ``print('hello there')`` into the Python input.
624 | Mouse drag select that text
625 | Press :kbd:`Ctrl-c`
626 - | The selection should disappear.
627 | Try pasting into a separate text editor, the paste should
628 | match the text you drag selected.
629 - |checkbox|
630
Anthony DiGirolamofc1c7162021-07-29 08:41:52 -0700631Incremental Stdout
632^^^^^^^^^^^^^^^^^^
633
634.. list-table::
635 :widths: 5 45 45 5
636 :header-rows: 1
637
638 * - #
639 - Test Action
640 - Expected Result
641 - ✅
642
643 * - 1
644 - | Click the :guilabel:`Python Input` window title
645 - Python Input pane is focused
646 - |checkbox|
647
648 * - 2
649 - | Enter the following text and hit enter twice
650 | ``import time``
651 | ``for i in range(10):``
652 | ``print(i); time.sleep(1)``
653 - | ``Running...`` should appear in the python with
654 | increasing integers incrementally appearing above
655 | (not all at once after a delay).
656 - |checkbox|
657
Anthony DiGirolamo8577f742021-08-06 11:33:42 -0700658Python Input & Output
659^^^^^^^^^^^^^^^^^^^^^
660
661.. list-table::
662 :widths: 5 45 45 5
663 :header-rows: 1
664
665 * - #
666 - Test Action
667 - Expected Result
668 - ✅
669
670 * - 1
Anthony DiGirolamo1f486482021-11-13 17:09:01 -0800671 - Click the ``Logs`` window title
672 - Log pane is focused
Anthony DiGirolamo8577f742021-08-06 11:33:42 -0700673 - |checkbox|
674
675 * - 2
Anthony DiGirolamo1f486482021-11-13 17:09:01 -0800676 - Click empty whitespace in the ``Python Results`` window
677 - Python Results pane is focused
678 - |checkbox|
679
680 * - 3
681 - Click empty whitespace in the ``Python Input`` window
682 - Python Input pane is focused
683 - |checkbox|
684
685 * - 4
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800686 - | Enter the following text and press :kbd:`Enter` to run
Anthony DiGirolamo8577f742021-08-06 11:33:42 -0700687 | ``[i for i in __builtins__ if not i.startswith('_')]``
688 - | The results should appear pretty printed
689 | with each list element on it's own line:
690 |
691 | >>> [i for i in __builtins__ if not i.startswith('_')]
692 | [ 'abs',
693 | 'all',
694 | 'any',
695 | 'ascii'
696 |
697 - |checkbox|
698
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -0800699 * - 5
Anthony DiGirolamoa84d9642022-01-31 18:25:03 -0800700 - | Enter the following text and press :kbd:`Enter` to run
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -0800701 | ``globals()``
702 - | The results should appear pretty printed
703 - |checkbox|
704
705 * - 6
706 - | With the cursor over the Python Output,
707 | use the mouse wheel to scroll up and down.
708 - | The output window should be able to scroll all
709 | the way to the beginning and end of the buffer.
710 - |checkbox|
711
Anthony DiGirolamoa6d01c42022-02-17 14:27:11 -0800712Early Startup
713^^^^^^^^^^^^^
714
715.. list-table::
716 :widths: 5 45 45 5
717 :header-rows: 1
718
719 * - #
720 - Test Action
721 - Expected Result
722 - ✅
723
724 * - 1
725 - | Start the pw console test mode by
726 | running ``pw console --test-mode``
727 - | Console starts up showing an ``All Logs`` window.
728 - |checkbox|
729
730 * - 2
731 - | Click the :guilabel:`All Logs` window title
732 | Press :kbd:`g` to jump to the top of the log history
733 - | These log messages should be at the top:
734 | ``DBG Adding plugins...``
735 | ``DBG Starting prompt_toolkit full-screen application...``
736 | ``DBG pw_console test-mode starting...``
737 | ``DBG pw_console.PwConsoleEmbed init complete``
738 - |checkbox|
739
Anthony DiGirolamod06db562022-02-01 21:56:27 -0800740Quit Confirmation Dialog
741^^^^^^^^^^^^^^^^^^^^^^^^
742
743.. list-table::
744 :widths: 5 45 45 5
745 :header-rows: 1
746
747 * - #
748 - Test Action
749 - Expected Result
750 - ✅
751
752 * - 1
753 - | Press :kbd:`Ctrl-d`
754 - | The quit dialog appears
755 - |checkbox|
756
757 * - 2
758 - | Press :kbd:`n`
759 - | The quit dialog disappears
760 - |checkbox|
761
762 * - 3
763 - | Press :kbd:`Ctrl-d`
764 - | The quit dialog appears
765 - |checkbox|
766
767 * - 4
768 - | Press :kbd:`y`
769 - | The console exits
770 - |checkbox|
771
772 * - 5
773 - | Restart the console and
774 | Press :kbd:`Ctrl-d` twice in quick succession.
775 - | The console exits
776 - |checkbox|
777
778 * - 6
779 - | Restart the console and Press :kbd:`F1`
780 - | The help window appears
781 - |checkbox|
782
783 * - 7
784 - | Press :kbd:`Ctrl-d`
785 - | The quit dialog appears on top of the help window
786 - |checkbox|
787
788 * - 8
789 - | Press :kbd:`n`
790 - | The quit dialog disappears and the help window is
791 | back in focus.
792 - |checkbox|
793
794 * - 9
795 - | Press :kbd:`q`
796 - | The help window disappears and the Python Input is in focus.
797 - |checkbox|
798
799 * - 10
800 - | Type some text into the Python Input.
801 | Press :kbd:`Home` or move the cursor to the
802 | beginning of the text you just entered.
803 | Press :kbd:`Ctrl-d`
804 - | Each :kbd:`Ctrl-d` press deletes one character
805 - |checkbox|
806
807 * - 11
808 - | Press :kbd:`Ctrl-c` to clear the Python Input text
809 | Press :kbd:`Ctrl-d`
810 - | The quit dialog appears.
811 - |checkbox|
812
Anthony DiGirolamo54db7652021-07-28 11:14:24 -0700813Add note to the commit message
Anthony DiGirolamoc6126af2021-12-15 14:10:32 -0800814==============================
Anthony DiGirolamo46440992021-07-19 16:07:47 -0700815
816Add a ``Testing:`` line to your commit message and mention the steps
817executed. For example:
818
819.. code-block:: text
820
Anthony DiGirolamo802f5992021-07-28 22:52:54 -0700821 Testing: Log Pane Steps 1-6
Anthony DiGirolamoe8f44742021-07-20 17:23:22 -0700822
823.. |checkbox| raw:: html
824
825 <input type="checkbox">