fix(tests): align output-rendering tests with spec §26936 progress-omission and renamed TerminalCapabilities fields
Four CI failures fixed:
1. JSON/YAML progress scenarios (features/output_rendering.feature:588 and :1584):
The conflict resolver had preserved master's test assertions expecting
ProgressIndicator elements in JSON/YAML data arrays, but the PR's
_snapshot_to_dict correctly omits them per spec §26936 ("progress is
omitted from JSON output"). Removed the assertions that contradict the
spec-compliant implementation.
2. ColumnDef all-fields scenario (:1885):
Test checked for "col_type" in raw JSON output, but _column_def_to_dict
serialises the field under the key "type" (via Pydantic alias). Changed
assertion to "width_hint" which IS a serialised key in the ColumnDef dict.
3. Rich-with-cursor scenario (:2154):
Step constructed TerminalCapabilities(supports_cursor=True, term=...) using
the old field names — now backward-compat properties, not Pydantic fields.
Pydantic silently ignores unknown kwargs, leaving supports_cursor_movement=False
and causing select_materializer("rich") to return TableMaterializer. Updated
to supports_cursor_movement=True and term_program="xterm-256color".
4. Robot json-all / yaml-all helpers:
Same conflict-resolution issue as #1: helper expected all 10 element types
including "progress" in JSON/YAML data arrays. Removed "progress" from both
expected lists to match the spec-compliant implementation.
This commit is contained in:
@@ -592,8 +592,6 @@ Feature: Output Rendering Framework
|
||||
And I close the progress handle
|
||||
And the session is closed
|
||||
Then the json output is valid JSON
|
||||
And the json output contains element type "progress"
|
||||
And the json output contains "Pipeline"
|
||||
|
||||
Scenario: JSON materializer serializes panel with style hint and icon
|
||||
Given an OutputSession with format "json" using JsonMaterializer
|
||||
@@ -1588,8 +1586,6 @@ Feature: Output Rendering Framework
|
||||
And I close the progress handle
|
||||
And the session is closed
|
||||
Then the yaml output is valid YAML
|
||||
And the yaml output contains "progress"
|
||||
And the yaml output contains "Deploying"
|
||||
|
||||
# ================================================================
|
||||
# N12: Table materializer — missing Status, Progress, Separator, ActionHint
|
||||
@@ -1889,7 +1885,7 @@ Feature: Output Rendering Framework
|
||||
And I close the table handle
|
||||
And the session is closed
|
||||
Then the json output is valid JSON
|
||||
And the json output contains "col_type"
|
||||
And the json output contains "width_hint"
|
||||
And the json output contains "alignment"
|
||||
|
||||
# ================================================================
|
||||
|
||||
Reference in New Issue
Block a user