Raxol.Test.Visual.Matchers (Raxol v0.3.0)
View SourceProvides pattern matching helpers for visual testing of Raxol components.
This module includes matchers for:
- ANSI color and style patterns
- Terminal layout patterns
- Border and edge patterns
- Component structure patterns
Summary
Functions
Matches specific text alignment patterns in the output.
Matches box drawing characters in the output.
Matches ANSI color codes in the output.
Matches specific component patterns in the output.
Matches specific layout patterns in the output.
Matches ANSI style codes in the output.
Functions
Matches specific text alignment patterns in the output.
Example
output
|> matches_alignment(:left)
|> matches_alignment(:right, width: 80)
Matches box drawing characters in the output.
Example
output
|> matches_box_edges()
|> matches_box_corners()
Matches ANSI color codes in the output.
Example
output
|> matches_color(:red, "Error message")
|> matches_color(:green, "Success")
Matches specific component patterns in the output.
Example
output
|> matches_component(:button, "Click me")
|> matches_component(:input, placeholder: "Enter text")
Matches specific layout patterns in the output.
Example
output
|> matches_layout(:centered)
|> matches_layout(:padded, padding: 2)
Matches ANSI style codes in the output.
Example
output
|> matches_style(:bold, "Important")
|> matches_style(:underline, "Link")