fix(plan): remove TDD expected fail tag and fix format violations
CI / lint (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 1m0s
CI / build (pull_request) Successful in 32s
CI / helm (pull_request) Successful in 27s
CI / push-validation (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 1m15s
CI / e2e_tests (pull_request) Successful in 3m6s
CI / unit_tests (pull_request) Failing after 4m36s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 6m32s
CI / coverage (pull_request) Successful in 11m39s
CI / status-check (pull_request) Failing after 3s
CI / lint (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 1m0s
CI / build (pull_request) Successful in 32s
CI / helm (pull_request) Successful in 27s
CI / push-validation (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 1m15s
CI / e2e_tests (pull_request) Successful in 3m6s
CI / unit_tests (pull_request) Failing after 4m36s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 6m32s
CI / coverage (pull_request) Successful in 11m39s
CI / status-check (pull_request) Failing after 3s
- Remove @tdd_expected_fail from Tree with json format scenario in plan_explain.feature (bug is now fixed by the envelope implementation) - Update scenario assertions to verify new spec-required envelope format instead of old bare-array format - Add step_tree_json_valid_envelope step definition in plan_explain_steps.py - Fix ruff format violation in plan_explain_cli_coverage_steps.py ISSUES CLOSED: #9163
This commit is contained in:
@@ -107,12 +107,12 @@ Feature: Plan explain and decision tree CLI commands
|
||||
# plan tree - json format
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
@tdd_issue @tdd_issue_4254 @tdd_expected_fail
|
||||
@tdd_issue @tdd_issue_4254
|
||||
Scenario: Tree with json format
|
||||
Given a set of test decisions forming a tree
|
||||
When I format the tree as json
|
||||
Then the json tree output should be valid json
|
||||
And the json tree output should contain "decision_id"
|
||||
Then the json tree output should be a valid json envelope
|
||||
And the json tree output should contain "command"
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# plan tree - yaml format
|
||||
|
||||
@@ -815,8 +815,12 @@ def step_pec_output_valid_json_envelope(context: Context) -> None:
|
||||
f"Expected envelope keys {_ENVELOPE_KEYS}, got {set(parsed.keys())}"
|
||||
)
|
||||
data = parsed["data"]
|
||||
assert isinstance(data, dict), f"Expected envelope data to be a dict, got {type(data)}"
|
||||
assert "plan_id" in data, f"Expected 'plan_id' in envelope data, got {set(data.keys())}"
|
||||
assert isinstance(data, dict), (
|
||||
f"Expected envelope data to be a dict, got {type(data)}"
|
||||
)
|
||||
assert "plan_id" in data, (
|
||||
f"Expected 'plan_id' in envelope data, got {set(data.keys())}"
|
||||
)
|
||||
|
||||
|
||||
@then("pec the tree should exclude the superseded grandchild")
|
||||
|
||||
@@ -405,6 +405,18 @@ def step_tree_json_valid(context: Context) -> None:
|
||||
assert isinstance(parsed, list), "Expected a JSON array"
|
||||
|
||||
|
||||
@then("the json tree output should be a valid json envelope")
|
||||
def step_tree_json_valid_envelope(context: Context) -> None:
|
||||
parsed = json.loads(context.pe_tree_json)
|
||||
assert isinstance(parsed, dict), (
|
||||
f"Expected a JSON object (envelope), got {type(parsed)}"
|
||||
)
|
||||
_envelope_keys = {"command", "status", "exit_code", "data", "timing", "messages"}
|
||||
assert _envelope_keys.issubset(parsed.keys()), (
|
||||
f"Expected envelope keys {_envelope_keys}, got {set(parsed.keys())}"
|
||||
)
|
||||
|
||||
|
||||
@then('the json tree output should contain "{text}"')
|
||||
def step_tree_json_contains(context: Context, text: str) -> None:
|
||||
assert text in context.pe_tree_json, f"Expected '{text}' in tree JSON"
|
||||
|
||||
Reference in New Issue
Block a user