Open ogoffart opened 3 years ago
Related topic to make easier to do UI testing could be done with the accessibility API.
Tests could look like:
#[test]
fn click_button_increase_value() {
// Set the slint platform to a thread-safe equivalent of the testing backend.
init_test_backend();
// Create gui with callback connections (Same as the real app)
let handle = setup_ui();
let button_under_test /* : slint::testing::AccessibleWidgetHanbdle */
= slint::testing::match_accessible_widget_from_text(handle, "Increase value").unwrap();
button_under_test.action(Action::Click).unwrap();
assert_eq!(handle.get_counter(), 2);
}
We should make a way to record the input events to enable to make UX testing. With that we could make it easier to write automated UI testing. And also offer ways to analyses how tester user are using the interface and gather data.