From d57088a592637e883a676bad6f0edc7cfed3aa8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 16 Nov 2022 14:45:46 +0100 Subject: [PATCH] feat: add tests for slider --- services/modals/src/tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/services/modals/src/tests.rs b/services/modals/src/tests.rs index d7206528d..cf9119f6e 100644 --- a/services/modals/src/tests.rs +++ b/services/modals/src/tests.rs @@ -96,6 +96,20 @@ pub fn spawn_test() { } Err(e) => log::error!("couldn't get input: {:?}", e), } + + // 6. human interaction-enabled slider + log::info!("testing human interaction-enabled slider"); + let result = modals.slider( + "Human interaction-enabled slider!", + 0, + 100, + 50, + ).expect("slider test failed"); + + modals.show_notification(&format!("Slider value: {}", result), None) + .expect("cannot show slider result notification"); + + log::info!("slider test done"); } }); @@ -165,6 +179,9 @@ pub fn spawn_test() { modals.show_image(bm).expect("show image modal failed"); log::info!("image modal test done"); } + + // 6. test that human-interactable slider modal + log::info!("testing human interaction-enabled modal"); } }); }