Skip to content

test: add functional tests for config, git adapter, views, keymaps, and bug fixes#78

Merged
dlyongemallo merged 19 commits intomainfrom
add_many_tests
Mar 31, 2026
Merged

test: add functional tests for config, git adapter, views, keymaps, and bug fixes#78
dlyongemallo merged 19 commits intomainfrom
add_many_tests

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 09:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a broad set of functional/regression tests across Diffview’s config, actions, adapters, and UI components, plus a small documentation clarification in TIPS.md. This fits the codebase’s existing Plenary/Busted functional test suite by expanding coverage for previously-fixed bugs and newly-added features.

Changes:

  • Add multiple new functional specs covering config options/features, actions (layout cycling, restore, open-in-new-tab), adapter behaviors, rendering, keymap save/restore, debounce, and various historical bug fixes.
  • Extend existing window and git adapter functional specs with additional regression cases.
  • Clarify a leader-key/keymap conflict tip in TIPS.md.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
TIPS.md Clarifies how <space> in the file panel can intercept <leader> sequences due to buffer-local keymaps.
lua/diffview/tests/functional/window_spec.lua Adds tests ensuring _save_winopts handles global-only options safely.
lua/diffview/tests/functional/toggle_spec.lua Adds functional coverage for diffview.toggle() open/close behavior and arg passthrough.
lua/diffview/tests/functional/panel_render_spec.lua Adds coverage for file panel rendering (folder counts, loading indicator, “clean” messaging) and collapsed-state preservation.
lua/diffview/tests/functional/node_spec.lua Adds comparator tests for file tree node sorting, including custom sort_file.
lua/diffview/tests/functional/misc_fixes_spec.lua Adds regression tests for several historical fixes (oop super call, hg/git guards, config validation, hl style, etc.).
lua/diffview/tests/functional/merge_artifacts_spec.lua Adds tests for merge artifact detection/filtering behavior.
lua/diffview/tests/functional/keymap_save_spec.lua Adds tests for buffer-local keymap save/restore during File:attach_buffer() / :detach_buffer().
lua/diffview/tests/functional/git_adapter_spec.lua Extends git adapter tests (show/log args, untracked logic, merge-base behavior) and job env expectations.
lua/diffview/tests/functional/fold_limit_spec.lua Adds regression tests ensuring custom fold logic remains removed.
lua/diffview/tests/functional/file_history_render_spec.lua Adds tests for file history rendering logic (stats bars, dates, entry cycling).
lua/diffview/tests/functional/debounce_spec.lua Adds tests for debounce/throttle/timeout/interval utilities in async context.
lua/diffview/tests/functional/cycle_layouts_spec.lua Adds tests for cycle layout defaults, name resolution, and cycling behavior with/without custom config.
lua/diffview/tests/functional/config_options_spec.lua Adds coverage for specific config defaults and setup persistence (always_show_sections, auto_close_on_empty, etc.).
lua/diffview/tests/functional/config_features_spec.lua Adds tests for additional config-driven features and validations (clean_up_buffers, rename_threshold, commit_format, etc.).
lua/diffview/tests/functional/closing_guard_spec.lua Adds regression tests for cancellation/guard logic when views are closing during async updates.
lua/diffview/tests/functional/browser_and_restore_spec.lua Adds tests for commit URL generation, platform browser command selection, open-in-new-tab, and directory restore behaviors.
lua/diffview/tests/functional/actions_features_spec.lua Adds action-focused regression tests (set_layout, copy_hash register, scrollbind cleanup, inlay hints).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/tests/functional/git_adapter_spec.lua Outdated
Comment thread lua/diffview/tests/functional/misc_fixes_spec.lua Outdated
Comment thread lua/diffview/tests/functional/browser_and_restore_spec.lua Outdated
Comment thread lua/diffview/tests/functional/config_features_spec.lua Outdated
Comment thread lua/diffview/tests/functional/merge_artifacts_spec.lua
@dlyongemallo dlyongemallo merged commit 62af032 into main Mar 31, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the add_many_tests branch March 31, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants