Files
cleveragents-core/features/cli_renderers_coverage.feature
HAL9000 195fbac109
CI / lint (pull_request) Successful in 40s
CI / helm (pull_request) Successful in 38s
CI / build (pull_request) Successful in 48s
CI / quality (pull_request) Successful in 1m0s
CI / typecheck (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m28s
CI / push-validation (pull_request) Successful in 20s
CI / unit_tests (pull_request) Successful in 5m8s
CI / docker (pull_request) Successful in 1m27s
CI / integration_tests (pull_request) Successful in 8m39s
CI / coverage (pull_request) Successful in 11m1s
CI / status-check (pull_request) Successful in 3s
fix: add required @a2a, @session, @cli tags to BDD feature files
Add domain-scenario Gherkin tags to all A2A, session, and CLI feature
files (30 files) so tests can be filtered individually via behave.

- 8 A2A feature files: @a2a tag
- 7 session feature files: @session tag
- 15 CLI feature files: @cli tag

ISSUES CLOSED: #9124
2026-06-02 15:41:06 -04:00

100 lines
4.4 KiB
Gherkin

@cli
@mock_only
Feature: CLI renderers coverage
Verifies render_error, render_success, render_warning, and render_empty
helper functions across all output formats (rich, json, plain).
# --- render_error ---
Scenario: render_error with rich format shows red label
Given a captured console for renderers
When I call render_error with label "NOT_FOUND" message "Item missing" fmt "rich"
Then the renderer output should contain "NOT_FOUND"
And the renderer output should contain "Item missing"
Scenario: render_error with json format produces JSON envelope
Given a captured console for renderers
When I call render_error with label "NOT_FOUND" message "Item missing" fmt "json"
Then the renderer output should contain "NOT_FOUND"
Scenario: render_error with plain format shows ERROR prefix
Given a captured console for renderers
When I call render_error with label "NOT_FOUND" message "Item missing" fmt "plain"
Then the renderer output should contain "ERROR: NOT_FOUND: Item missing"
Scenario: render_error with recovery hint in rich format
Given a captured console for renderers
And a recovery hint "Try 'list' first"
When I call render_error with label "NOT_FOUND" message "Item missing" fmt "rich"
Then the renderer output should contain "Try 'list' first"
Scenario: render_error with recovery hint in plain format
Given a captured console for renderers
And a recovery hint "Try 'list' first"
When I call render_error with label "NOT_FOUND" message "Item missing" fmt "plain"
Then the renderer output should contain "Try 'list' first"
# --- render_success ---
Scenario: render_success with rich format shows green check
Given a captured console for renderers
When I call render_success with message "Created project" fmt "rich"
Then the renderer output should contain "Created project"
Scenario: render_success with json format produces JSON
Given a captured console for renderers
When I call render_success with message "Created project" fmt "json"
Then the renderer output should contain "ok"
Scenario: render_success with plain format shows OK prefix
Given a captured console for renderers
When I call render_success with message "Created project" fmt "plain"
Then the renderer output should contain "OK: Created project"
# --- render_warning ---
Scenario: render_warning with rich format shows yellow text
Given a captured console for renderers
When I call render_warning with message "Deprecated feature" fmt "rich"
Then the renderer output should contain "Deprecated feature"
Scenario: render_warning with json format produces JSON
Given a captured console for renderers
When I call render_warning with message "Deprecated feature" fmt "json"
Then the renderer output should contain "warning"
Scenario: render_warning with plain format shows WARNING prefix
Given a captured console for renderers
When I call render_warning with message "Deprecated feature" fmt "plain"
Then the renderer output should contain "WARNING: Deprecated feature"
# --- render_empty ---
Scenario: render_empty with rich format shows yellow message
Given a captured console for renderers
When I call render_empty with entity_type "actions" fmt "rich"
Then the renderer output should contain "No actions found"
Scenario: render_empty with json format produces empty list
Given a captured console for renderers
When I call render_empty with entity_type "actions" fmt "json"
Then the renderer output should contain "[]"
Scenario: render_empty with plain format shows text
Given a captured console for renderers
When I call render_empty with entity_type "actions" fmt "plain"
Then the renderer output should contain "No actions found."
Scenario: render_empty with recovery hint in rich format
Given a captured console for renderers
And a recovery hint "Run 'action create' first"
When I call render_empty with entity_type "actions" fmt "rich"
Then the renderer output should contain "Run 'action create' first"
Scenario: render_empty with table format and recovery
Given a captured console for renderers
And a recovery hint "Run 'project create' first"
When I call render_empty with entity_type "projects" fmt "table"
Then the renderer output should contain "No projects found."
And the renderer output should contain "Run 'project create' first"