textual/tests
Darren Burns fa4f75fd25
Text area undo redo (#4124)
* Initial undo related machinery added to TextArea

* Initial undo implementation

* Basic undo and redo

* Some more fleshing out of undo and redo

* Skeleton code for managing TextArea history

* Initial implementation of undo & redo checkpointing in TextArea

* Increase checkpoint characters

* Restoring the selection in the TextArea and then restoring it on undo

* Adding docstrings to undo_batch and redo_batch in the TextArea

* Batching edits of the same type

* Batching edits of the same type

* Keeping edits containing newlines in their own batch

* Checking for newline characters in insertion or replacement during undo checkpoint creation. Updating docstrings in history.py

* Fix mypy warning

* Performance improvement

* Add history checkpoint on cursor movement

* Fixing merge conflict in Edit class

* Fixing error in merge conflict resolution

* Remove unused test file

* Remove unused test file

* Initial testing of undo and redo

* Testing for undo redo

* Updating lockfile

* Add an extra test

* Fix: setting the `text` property programmatically should invalidate the edit history

* Improving docstrings

* Rename EditHistory.reset() to EditHistory.clear()

* Add docstring to an exception

* Add a pause after focus/blur in a test

* Forcing CI colour

* Update focus checkpoint test

* Try to force color in pytest by setting --color=yes in PYTEST_ADDOPTS in env var on Github Actions

* Add extra assertion in a test

* Toggle text_area has focus to trigger checkpoint in history

* Apply grammar/wording suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Making max checkpoints configurable in TextArea history

* Improve a docstring

* Update changelog

* Spelling fixes

* More spelling fixes

* Americanize spelling of tab_behaviour (->tab_behavior)

* Update CHANGELOG regarding `tab_behaviour`->`tab_behavior`

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-14 13:11:14 +00:00
..
command_palette Lazy command provider (#3756) 2023-11-27 14:15:58 +00:00
css Fix CSS watcher crashing when file becomes unavailable... (#4079) 2024-01-31 13:10:14 +00:00
directory_tree Add a unit test for testing #2363 2023-07-24 14:32:27 +01:00
document Updating some more tests 2024-01-18 10:54:00 +00:00
input input restriction (#3657) 2023-11-10 16:16:42 +00:00
layouts Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
listview Simplify validation of setting highlighted reactive. 2024-01-15 13:59:57 +00:00
notifications Don't hard-code the tested timeout in the notification tests 2024-01-22 08:16:59 +00:00
option_list Fix broken OptionList Option id mapping 2024-02-02 09:34:46 +00:00
renderables blog post new release (#2712) 2023-06-01 11:33:54 +01:00
select fix(select): watch reactive prompt change (#3701) 2023-11-27 10:46:36 +00:00
selection_list Add regression test. 2024-01-09 14:21:03 +00:00
snapshot_tests Text area read only (#4151) 2024-02-13 15:16:57 +00:00
suggester Add tests for suggester. 2023-05-25 17:32:26 +01:00
text_area Text area undo redo (#4124) 2024-02-14 13:11:14 +00:00
toggles Refactor keyboard navigation in radio set. 2023-12-20 16:36:49 +00:00
tree Preserve state while reloading directory tree. 2024-02-05 17:23:33 +00:00
utilities Textual dev (#2884) 2023-07-03 15:37:40 +01:00
workers Merge tests. 2023-10-25 17:12:41 +01:00
__init__.py workflow 2021-07-05 20:37:54 +01:00
test_actions.py Add tests for action parsing. (#2112) 2023-03-23 15:54:06 +00:00
test_animation.py Test flakiness investigation and attempted fixes ❄ (#3498) 2023-10-25 14:41:02 +01:00
test_animator.py Cancelling scrolling animations on new scroll_to calls (#4081) 2024-01-31 16:27:48 +00:00
test_app.py Blur (#3645) 2023-11-07 16:22:40 +00:00
test_arrange.py Optimizations (#3837) 2023-12-09 11:17:59 +00:00
test_auto_refresh.py test fix 2022-10-29 10:03:26 +01:00
test_await_remove.py Fix CancelledError (#2895) 2023-07-06 14:16:23 +01:00
test_binding.py Select widget (#2501) 2023-05-08 10:55:39 +01:00
test_binding_inheritance.py Remove Ctrl+Z as the default binding for suspending 2024-01-30 14:04:35 +00:00
test_border.py Fixes suggested by linter (#2769) 2023-06-12 15:00:19 +01:00
test_border_subtitle.py border classvars (#3097) 2023-08-15 10:34:24 +01:00
test_box_drawing.py Keyline rule (#3669) 2023-11-27 11:54:53 +00:00
test_box_model.py snapshots 2024-01-31 13:42:30 +00:00
test_cache.py Make cache public (#3976) 2024-01-08 13:19:33 +00:00
test_call_x_schedulers.py call_next preserves prevented messages information. 2023-08-24 16:05:25 +01:00
test_case.py eof 2021-08-31 17:53:41 +01:00
test_collapsible.py feat(collapsible): make title a reactive attribute (#3830) 2023-12-15 10:39:42 +00:00
test_color.py Fixes suggested by linter (#2769) 2023-06-12 15:00:19 +01:00
test_compositor_regions_to_spans.py span refinements 2022-05-10 17:37:27 +01:00
test_concurrency.py Rich log (#3046) 2023-08-03 10:11:17 +01:00
test_containers.py Allow scrollbar size of zero (scrollable containers without scrollbars) (#3488) 2023-10-10 15:37:13 +01:00
test_content_switcher.py Add more testing for the ContentSwitcher 2023-06-05 09:05:11 +01:00
test_dark_toggle.py remove some pauses 2023-01-26 16:10:13 +01:00
test_data_bind.py simplify bind API 2024-02-01 15:27:59 +00:00
test_data_table.py Fix DataTable.move_cursor(..., animate) 2024-01-05 17:54:36 +00:00
test_disabled.py Rich log (#3046) 2023-08-03 10:11:17 +01:00
test_dom.py Validate ids (#4032) 2024-01-23 15:19:02 +00:00
test_driver.py Test new click/focus behaviour. 2023-10-11 14:23:11 +01:00
test_easing.py Remove draw.py, fix imports 2022-10-13 11:15:15 +01:00
test_expand_tabs.py Fixing insert value on tab key press, tests for get_tab_widths 2024-01-16 10:24:34 +00:00
test_features.py remove property 2022-10-22 17:35:11 +01:00
test_file_monitor.py Fix CSS watcher crashing when file becomes unavailable... (#4079) 2024-01-31 13:10:14 +00:00
test_focus.py allow focus (#3989) 2024-01-09 15:36:03 +00:00
test_footer.py Add regression test for #2606. 2023-05-22 13:53:58 +01:00
test_freeze.py remove except 2023-01-19 14:18:40 +00:00
test_fuzzy.py Command Palette tweaks and docs (#3289) 2023-09-13 15:03:25 +01:00
test_geometry.py Tooltips (#2670) 2023-05-30 16:14:31 +01:00
test_header.py Test screen (sub-)title. 2023-08-29 12:07:09 +01:00
test_immutable_sequence_view.py Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
test_keys.py fix: display same key symbol when used with modifier (#3050) 2024-01-31 09:52:34 +00:00
test_layout_resolve.py Remove draw.py, fix imports 2022-10-13 11:15:15 +01:00
test_lazy.py lazy mount (#3936) 2024-01-01 15:54:55 +00:00
test_line_filter.py implement dim fix (#2326) 2023-04-19 13:24:31 +01:00
test_line_split.py Rich log (#3046) 2023-08-03 10:11:17 +01:00
test_loading.py simplify loading (#3816) 2023-12-06 17:31:03 +00:00
test_log.py Rich log (#3046) 2023-08-03 10:11:17 +01:00
test_loop.py Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
test_markdown.py fixup! Return a boolean from Markdown.goto_anchor 2023-09-18 11:35:38 +02:00
test_markdownviewer.py Escape markup in markdown headings. (#3697) 2023-11-20 10:58:59 +00:00
test_message_handling.py Add regression test for #1814. 2023-03-13 15:14:12 +00:00
test_message_pump.py Signal (#4012) 2024-01-23 17:20:11 +00:00
test_mount.py Compositor ignores non-mounted widgets. 2023-11-21 14:23:09 +00:00
test_node_list.py Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
test_on.py Swap to selecting on the pane for TabbedContent.TabActivated 2023-12-07 12:03:39 +00:00
test_overflow_change.py Renamed 'Vertical' to 'VerticalScroll'. 2023-03-08 18:31:24 +00:00
test_parser.py Backtracking unknown escape sequences, various tests for XTermParser 2022-06-17 15:35:20 +01:00
test_partition.py test fix 2022-07-29 10:28:50 +01:00
test_paste.py Fix tests. 2023-05-17 10:27:57 +01:00
test_path.py Rename CSS files to TCSS. 2023-08-22 13:21:17 +01:00
test_pilot.py Add Pilot.mouse_down/mouse_up. 2023-10-11 14:22:53 +01:00
test_placeholder.py Update example and test files. 2022-11-25 18:23:24 +00:00
test_progress_bar.py Tweak progress bar docs. (#3286) 2023-09-20 13:51:01 +01:00
test_query.py Signal (#4012) 2024-01-23 17:20:11 +00:00
test_reactive.py Add test. 2024-02-08 10:49:20 +00:00
test_resolve.py Fixes suggested by linter (#2769) 2023-06-12 15:00:19 +01:00
test_rule.py feat: add rule widget (#3209) 2023-09-04 17:57:10 +01:00
test_screen_modes.py Test flakiness investigation and attempted fixes ❄ (#3498) 2023-10-25 14:41:02 +01:00
test_screens.py Fix imports. 2023-10-26 12:15:55 +01:00
test_segment_tools.py Fix for CSS outline issues (#3656) 2023-11-14 11:43:45 +00:00
test_signal.py Signal (#4012) 2024-01-23 17:20:11 +00:00
test_slug.py Add URL quoting as the final act of slugging 2023-09-05 13:51:17 +01:00
test_spatial_map.py Select widget (#2501) 2023-05-08 10:55:39 +01:00
test_strip.py Fix issue when crop start == cell length of a Strip (#3998) 2024-01-10 12:58:26 +00:00
test_style_importance.py Fixes suggested by linter (#2769) 2023-06-12 15:00:19 +01:00
test_style_inheritance.py Fix imports. 2023-10-26 12:15:55 +01:00
test_style_properties.py Cleanup and new test. 2023-01-17 10:29:19 +00:00
test_styles_cache.py Border style (#2292) 2023-04-16 12:31:39 +01:00
test_suggestions.py [css] Address "did you mean" PR feedback 2022-05-03 15:40:06 +01:00
test_suspend.py Update suspend testing for the new approach 2024-01-31 11:01:42 +00:00
test_switch.py Fixes a bug that causes Click events to bubble up from Switch widgets. 2023-07-22 11:42:32 +02:00
test_tabbed_content.py Signal (#4012) 2024-01-23 17:20:11 +00:00
test_tabs.py Add a test for low-level tab relabelling 2024-01-08 15:28:04 +00:00
test_test_runner.py Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
test_textlog.py Rich log (#3046) 2023-08-03 10:11:17 +01:00
test_two_way_dict.py Updating tests for DataTable 2023-02-09 11:16:14 +00:00
test_unmount.py mass renaming 2023-02-13 15:09:40 +00:00
test_validation.py Validation (#2600) 2023-05-25 13:29:33 +01:00
test_version.py added test 2023-01-18 14:51:50 +00:00
test_visible.py Consider visible children inside invisible containers when computing focus chain (#3070) 2023-08-28 11:06:39 +01:00
test_widget.py lazy mount (#3936) 2024-01-01 15:54:55 +00:00
test_widget_child_moving.py Refactor tests. 2023-12-20 12:00:52 +00:00
test_widget_mount_point.py mass renaming 2023-02-13 15:09:40 +00:00
test_widget_mounting.py mass renaming 2023-02-13 15:09:40 +00:00
test_widget_navigation.py Make widget_navigation module private. 2024-01-08 11:19:17 +00:00
test_widget_removing.py Fixes suggested by linter (#2769) 2023-06-12 15:00:19 +01:00
test_win_sleep.py Merge branch 'win-sleep-bug' of github.com:textualize/textual into win-sleep-bug 2023-06-12 11:38:48 +01:00
test_wrap.py Updating chunk and divide_line tests using to reflect code changes 2024-01-18 12:56:47 +00:00
test_xterm_parser.py Add two tests for completeness of combinations. 2023-10-11 14:21:41 +01:00