use insta_image::assert_png_snapshot;
use std::time::Instant;
use wings_rs::font_panel::FontPanel;
use wings_rs_tests::HeadlessApplication;

#[test]
fn show_font_panel() {
    let mut app = HeadlessApplication::new();
    let mut font_panel =
        FontPanel::new(app.screen.as_ptr()).expect("could not construct font panel");
    font_panel.show();
    while app.pump_event_queue(Instant::now()) {}
    assert_png_snapshot!("font_panel", app.xvfb.png_screenshot());
}
