Skip to content

Commit 56f7885

Browse files
committed
kittest of color test
1 parent 9a403ef commit 56f7885

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

crates/egui_demo_lib/src/rendering_test.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -681,21 +681,24 @@ fn mul_color_gamma(left: Color32, right: Color32) -> Color32 {
681681
#[cfg(test)]
682682
mod tests {
683683
use crate::ColorTest;
684-
use egui::vec2;
684+
use egui_kittest::kittest::Queryable as _;
685685

686686
#[test]
687687
pub fn rendering_test() {
688688
let mut errors = vec![];
689689
for dpi in [1.0, 1.25, 1.5, 1.75, 1.6666667, 2.0] {
690690
let mut color_test = ColorTest::default();
691691
let mut harness = egui_kittest::Harness::builder()
692-
.with_size(vec2(2000.0, 2000.0))
693692
.with_pixels_per_point(dpi)
694693
.build_ui(|ui| {
695694
color_test.ui(ui);
696695
});
697696

698-
//harness.set_size(harness.ctx.used_size());
697+
{
698+
// Expand color-test collapsing header
699+
harness.get_by_label("Color test").click();
700+
harness.run();
701+
}
699702

700703
harness.fit_contents();
701704

Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)