pub struct WasmDriver { /* private fields */ }Expand description
WASM Driver wrapping calculator and mock DOM
Implementations§
Source§impl WasmDriver
impl WasmDriver
Sourcepub fn with_validator(validator: AnomalyValidator) -> Self
pub fn with_validator(validator: AnomalyValidator) -> Self
Creates a WASM driver with custom Anomaly validator
Sourcepub fn with_calculator_and_dom(calculator: WasmCalculator, dom: MockDom) -> Self
pub fn with_calculator_and_dom(calculator: WasmCalculator, dom: MockDom) -> Self
Creates a WASM driver with existing calculator and DOM
Sourcepub fn calculator(&self) -> &WasmCalculator
pub fn calculator(&self) -> &WasmCalculator
Returns a reference to the calculator
Sourcepub fn calculator_mut(&mut self) -> &mut WasmCalculator
pub fn calculator_mut(&mut self) -> &mut WasmCalculator
Returns a mutable reference to the calculator
Sourcepub fn type_input(&mut self, text: &str)
pub fn type_input(&mut self, text: &str)
Simulates typing into the input field
Sourcepub fn click_equals(&mut self)
pub fn click_equals(&mut self)
Simulates clicking the equals button
Sourcepub fn click_clear(&mut self)
pub fn click_clear(&mut self)
Simulates clicking the clear button
Sourcepub fn press_enter(&mut self)
pub fn press_enter(&mut self)
Simulates pressing Enter key
Sourcepub fn press_escape(&mut self)
pub fn press_escape(&mut self)
Simulates pressing Escape key
Sourcepub fn press_backspace(&mut self)
pub fn press_backspace(&mut self)
Simulates pressing Backspace key
Sourcepub fn result_element_text(&self) -> Option<&str>
pub fn result_element_text(&self) -> Option<&str>
Gets the result element’s text
Sourcepub fn input_element_text(&self) -> Option<&str>
pub fn input_element_text(&self) -> Option<&str>
Gets the input element’s text
Sourcepub fn status_element_text(&self) -> Option<&str>
pub fn status_element_text(&self) -> Option<&str>
Gets the status element’s text
Sourcepub fn history_list_items(&self) -> Vec<String>
pub fn history_list_items(&self) -> Vec<String>
Gets history list items
Trait Implementations§
Source§impl CalculatorDriver for WasmDriver
impl CalculatorDriver for WasmDriver
Source§fn enter_expression(&mut self, expr: &str) -> CalcResult<()>
fn enter_expression(&mut self, expr: &str) -> CalcResult<()>
Enters an expression into the calculator
Source§fn get_result(&self) -> String
fn get_result(&self) -> String
Gets the current result display
Source§fn get_history(&self) -> Vec<HistoryItem>
fn get_history(&self) -> Vec<HistoryItem>
Gets history entries (newest first)
Source§fn get_jidoka_status(&self) -> Vec<String>
fn get_jidoka_status(&self) -> Vec<String>
Gets Anomaly status messages
Source§impl Debug for WasmDriver
impl Debug for WasmDriver
Auto Trait Implementations§
impl Freeze for WasmDriver
impl RefUnwindSafe for WasmDriver
impl Send for WasmDriver
impl Sync for WasmDriver
impl Unpin for WasmDriver
impl UnsafeUnpin for WasmDriver
impl UnwindSafe for WasmDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more