mod common;
mod golden;

use bone_jig::RunStatus;
use common::{find_artifact, manifest_path, run_library_scenario};
use golden::check_golden;

#[test]
fn a_face_sketch_shows_the_host_body() {
    let dir = match tempfile::tempdir() {
        Ok(d) => d,
        Err(e) => panic!("tempdir: {e}"),
    };
    let result = run_library_scenario("parity_sketch_on_face.ron", dir.path());
    assert_eq!(result.status, RunStatus::Passed, "result: {result:?}");
    let snapshot = find_artifact(dir.path(), "_sketch-on-face.png");
    check_golden(
        "sketch-on-face",
        &snapshot,
        &manifest_path("tests/goldens/sketch_on_face.png"),
        "BONE_UPDATE_SKETCH_ON_FACE",
    );
}
