forked from HAL9000/cleveragents-core
92 lines
3.8 KiB
Gherkin
92 lines
3.8 KiB
Gherkin
Feature: YAML Template Engine Coverage Gaps
|
|
As a developer using CleverAgents
|
|
I want to ensure all methods in YAMLTemplateEngine are covered
|
|
So that critical functionality is thoroughly tested
|
|
|
|
Background:
|
|
Given the YAML template engine is initialized
|
|
|
|
@coverage_gaps
|
|
Scenario: Test postprocessing with line-splitting logic
|
|
Given I have YAML content that triggers postprocessing line splitting
|
|
When I test the postprocessing method directly
|
|
Then the line splitting logic should be executed
|
|
And problematic lines should be restructured
|
|
|
|
@coverage_gaps
|
|
Scenario: Test YAML fix with multiple colon issues
|
|
Given I have YAML with multiple colons that need fixing
|
|
When I test the fix common issues method directly
|
|
Then multiple colon lines should be processed
|
|
And tokens should be properly separated
|
|
And indentation should be maintained
|
|
|
|
@coverage_gaps
|
|
Scenario: Test sum filter with None filtering
|
|
Given I have data with None values for sum filter
|
|
When I test the sum filter directly with None values
|
|
Then None values should be filtered out by sum filter
|
|
And remaining values should be summed correctly
|
|
|
|
@coverage_gaps
|
|
Scenario: Test sum filter with missing attributes
|
|
Given I have objects with missing attributes for sum filter
|
|
When I test the sum filter with attribute parameter
|
|
Then missing attributes should be treated as zero
|
|
And available attributes should be summed
|
|
|
|
@coverage_gaps
|
|
Scenario: Test selectattr filter with various operators
|
|
Given I have data for testing all selectattr operators
|
|
When I test selectattr filter with greater than operator
|
|
And I test selectattr filter with less than operator
|
|
And I test selectattr filter with greater equal operator
|
|
And I test selectattr filter with less equal operator
|
|
And I test selectattr filter with not equal operator
|
|
And I test selectattr filter with unknown operator
|
|
Then all operators should work correctly
|
|
And unknown operators should default to equality
|
|
|
|
@coverage_gaps
|
|
Scenario: Test selectattr filter with missing attributes
|
|
Given I have objects with missing attributes for selectattr
|
|
When I test selectattr filter on missing attributes
|
|
Then objects without the attribute should be handled gracefully
|
|
And None values should be properly filtered
|
|
|
|
@coverage_gaps
|
|
Scenario: Test structure analysis with template blocks
|
|
Given I have YAML with various template blocks
|
|
When I analyze the YAML structure for templates
|
|
Then template blocks should be identified correctly
|
|
And block types should be detected
|
|
And block boundaries should be found
|
|
|
|
@coverage_gaps
|
|
Scenario: Test block end finding with different indentations
|
|
Given I have template blocks with varying indentations
|
|
When I find block end boundaries
|
|
Then end markers should respect indentation levels
|
|
And nested blocks should be handled correctly
|
|
|
|
@coverage_gaps
|
|
Scenario: Test template extraction with complex structures
|
|
Given I have complex templates that may fail extraction
|
|
When I attempt complex template extraction
|
|
Then fallback to simple extraction should occur
|
|
And templates should be marked for deferred rendering
|
|
|
|
@coverage_gaps
|
|
Scenario: Test template reconstruction from stored structure
|
|
Given I have stored template structures with various types
|
|
When I reconstruct YAML from the structures
|
|
Then template blocks should be restored
|
|
And inline templates should be placed correctly
|
|
And nested structures should be reconstructed
|
|
|
|
@coverage_gaps
|
|
Scenario: Test template rendering with different storage formats
|
|
Given I have templates in raw and structured formats
|
|
When I render templates from both formats
|
|
Then both formats should be supported
|
|
And template variables should be substituted correctly |