pub struct TestApp {
pub config: TestConfig,
pub components: Vec<TestComponent>,
}Expand description
A test application for component testing
Fields§
§config: TestConfig§components: Vec<TestComponent>Implementations§
Source§impl TestApp
impl TestApp
Sourcepub fn new(config: TestConfig) -> Self
pub fn new(config: TestConfig) -> Self
Create a new test app
Sourcepub fn add_component(&mut self, component: TestComponent)
pub fn add_component(&mut self, component: TestComponent)
Add a component to the test app
Sourcepub fn get_component(&self, name: &str) -> Option<&TestComponent>
pub fn get_component(&self, name: &str) -> Option<&TestComponent>
Get a component by name
Sourcepub fn get_components(&self) -> &[TestComponent]
pub fn get_components(&self) -> &[TestComponent]
Get all components
Sourcepub fn set_breakpoint(&mut self, breakpoint: String)
pub fn set_breakpoint(&mut self, breakpoint: String)
Set the breakpoint for the test app
Sourcepub fn enable_dark_mode(&mut self)
pub fn enable_dark_mode(&mut self)
Enable dark mode for the test app
Sourcepub fn disable_dark_mode(&mut self)
pub fn disable_dark_mode(&mut self)
Disable dark mode for the test app
Sourcepub fn add_custom_css(&mut self, css: String)
pub fn add_custom_css(&mut self, css: String)
Add custom CSS to the test app
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestApp
impl RefUnwindSafe for TestApp
impl Send for TestApp
impl Sync for TestApp
impl Unpin for TestApp
impl UnwindSafe for TestApp
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