mod common;
mod golden;

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

#[test]
fn convert_entities_projects_a_face_boundary_into_the_sketch() {
    let dir = match tempfile::tempdir() {
        Ok(d) => d,
        Err(e) => panic!("tempdir: {e}"),
    };
    let result = run_library_scenario("parity_convert_entities.ron", dir.path());
    assert_eq!(result.status, RunStatus::Passed, "result: {result:?}");
    let snapshot = find_artifact(dir.path(), "_convert-entities.png");
    check_golden(
        "convert-entities",
        &snapshot,
        &manifest_path("tests/goldens/convert_entities.png"),
        "BONE_UPDATE_CONVERT_ENTITIES",
    );
}
