class Opal::Testing::FrameRecorder

Overview

React Ink-inspired discrete frame history recorder. Records successive rendered frames over time, allowing tests to verify transition sequences, loading animations, and frame-by-frame UI diffs.

Defined in:

opal/testing/frame_recorder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def buffers : Array(UI::Buffer) #

[View source]
def clear : self #

Clears all recorded history.


[View source]
def empty? : Bool #

Returns true if no frames have been recorded.


[View source]
def frames : Array(String) #

[View source]
def last_buffer : UI::Buffer | Nil #

Returns the most recently recorded buffer, or nil if none.


[View source]
def last_frame : String #

Returns the most recently recorded frame string, or empty string if none.


[View source]
def record(buffer : UI::Buffer) : self #

Records a snapshot of the current UI::Buffer.


[View source]
def record(text : String) : self #

Records a plain text or ANSI frame string.


[View source]
def size : Int32 #

Returns the number of recorded frames.


[View source]