class Tessell::Kit::TestDriver

Defined in:

tessell/kit/test_driver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : Root, host : Platform::Host | Nil = nil, backend : Symbol = :raw) #

后端::fake 走 FakeHost.inject → pump_frame → root.handle 完整管道; :raw 直投 root.handle(真实宿主用——合成输入不经 OS)。


[View source]

Instance Method Detail

def assert_text(name : String, expected : String) : Nil #

[View source]
def collect(sink : Array(ComponentRef)) : Nil #

[View source]
def find(name : String, role : Tessell::A11y::Role | Nil = nil) : Component #

[View source]
def focus(name : String) : Nil #

[View source]
def key(code : Tessell::Input::KeyCode, modifiers : Tessell::Input::Modifiers = Tessell::Input::Modifiers.none) : Nil #

[View source]
def press(name : String, role : Tessell::A11y::Role = Tessell::A11y::Role::Button) : Nil #

[View source]
def root : Root #

[View source]
def scroll(x : Float32, y : Float32, dx : Float32, dy : Float32) : Nil #

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

[View source]
def steps_log : String #

[View source]
def type(text : String) : Nil #

[View source]