Skip to content

Commit d57088a

Browse files
committed
feat: add tests for slider
1 parent 5243e8c commit d57088a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

services/modals/src/tests.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,20 @@ pub fn spawn_test() {
9696
}
9797
Err(e) => log::error!("couldn't get input: {:?}", e),
9898
}
99+
100+
// 6. human interaction-enabled slider
101+
log::info!("testing human interaction-enabled slider");
102+
let result = modals.slider(
103+
"Human interaction-enabled slider!",
104+
0,
105+
100,
106+
50,
107+
).expect("slider test failed");
108+
109+
modals.show_notification(&format!("Slider value: {}", result), None)
110+
.expect("cannot show slider result notification");
111+
112+
log::info!("slider test done");
99113
}
100114
});
101115

@@ -165,6 +179,9 @@ pub fn spawn_test() {
165179
modals.show_image(bm).expect("show image modal failed");
166180
log::info!("image modal test done");
167181
}
182+
183+
// 6. test that human-interactable slider modal
184+
log::info!("testing human interaction-enabled modal");
168185
}
169186
});
170187
}

0 commit comments

Comments
 (0)