Files
cleveragents-core/features/lsp_tool_adapter_coverage.feature
freemo 31472b5413
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
test(coverage): add Behave scenarios for 39 under-covered modules
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.

ISSUES CLOSED: #1232
2026-03-31 21:47:12 +00:00

49 lines
2.5 KiB
Gherkin

Feature: LSP Tool Adapter uncovered-line coverage
Exercise runtime-handler branches, workspace-symbols paths,
missing-argument guards, and the None-config check in
LspToolAdapter.generate_tool_specs (tool_adapter.py lines
126-153 and 198).
Scenario: ltacov generate_tool_specs raises ValueError when config is None
Given ltacov an LspToolAdapter with no runtime
When ltacov generate_tool_specs is called with None config
Then ltacov a ValueError with message "config must not be None" is raised
Scenario: ltacov workspace-symbols handler returns error when query is empty
Given ltacov a mock LspRuntime
And ltacov a runtime handler for workspace_symbols capability
When ltacov the handler is called with no query argument
Then ltacov the result is an error dict saying "query is required"
Scenario: ltacov workspace-symbols handler raises LspNotAvailableError with valid query
Given ltacov a mock LspRuntime
And ltacov a runtime handler for workspace_symbols capability
When ltacov the handler is called with query "MyClass"
Then ltacov an LspNotAvailableError is raised mentioning "workspace_symbols"
Scenario: ltacov runtime handler returns error when file_path is missing
Given ltacov a mock LspRuntime
And ltacov a runtime handler for diagnostics capability
When ltacov the handler is called with no file_path argument
Then ltacov the result is an error dict saying "file_path is required"
Scenario: ltacov runtime handler delegates diagnostics to runtime
Given ltacov a mock LspRuntime
And ltacov the runtime get_diagnostics returns sample items
And ltacov a runtime handler for diagnostics capability
When ltacov the handler is called with file_path "src/main.py"
Then ltacov the result contains a "diagnostics" key with the sample items
Scenario: ltacov runtime handler delegates completions to runtime
Given ltacov a mock LspRuntime
And ltacov the runtime get_completions returns sample items
And ltacov a runtime handler for completions capability
When ltacov the handler is called with file_path "src/main.py" line 10 column 5
Then ltacov the result contains a "completions" key with the sample items
Scenario: ltacov runtime handler raises LspNotAvailableError for unimplemented capability
Given ltacov a mock LspRuntime
And ltacov a runtime handler for hover capability
When ltacov the handler is called with file_path "src/main.py"
Then ltacov an LspNotAvailableError is raised mentioning "hover"