mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Add Harness::new_eframe and TestRenderer trait (#5539)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
This commit is contained in:
@@ -235,21 +235,21 @@ mod tests {
|
||||
let mut results = Vec::new();
|
||||
|
||||
harness.run();
|
||||
results.push(harness.try_wgpu_snapshot("modals_1"));
|
||||
results.push(harness.try_snapshot("modals_1"));
|
||||
|
||||
harness.get_by_label("Save").click();
|
||||
// TODO(lucasmerlin): Remove these extra runs once run checks for repaint requests
|
||||
harness.run();
|
||||
harness.run();
|
||||
harness.run();
|
||||
results.push(harness.try_wgpu_snapshot("modals_2"));
|
||||
results.push(harness.try_snapshot("modals_2"));
|
||||
|
||||
harness.get_by_label("Yes Please").click();
|
||||
// TODO(lucasmerlin): Remove these extra runs once run checks for repaint requests
|
||||
harness.run();
|
||||
harness.run();
|
||||
harness.run();
|
||||
results.push(harness.try_wgpu_snapshot("modals_3"));
|
||||
results.push(harness.try_snapshot("modals_3"));
|
||||
|
||||
for result in results {
|
||||
result.unwrap();
|
||||
@@ -282,6 +282,6 @@ mod tests {
|
||||
harness.run();
|
||||
|
||||
// This snapshots should show the progress bar modal on top of the save modal.
|
||||
harness.wgpu_snapshot("modals_backdrop_should_prevent_focusing_lower_area");
|
||||
harness.snapshot("modals_backdrop_should_prevent_focusing_lower_area");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user