use testty::assertion;
use testty::region::Region;
use testty::scenario::Scenario;
use crate::common;
use crate::common::BuilderEnv;
#[test]
fn projects_page_shows_cwd() {
let temp = tempfile::TempDir::new().expect("failed to create temp dir");
let env = BuilderEnv::new(temp.path()).expect("failed to create builder env");
let scenario = Scenario::new("projects_cwd")
.compose(&common::wait_for_agentty_startup())
.viewing_pause_ms(2000)
.capture_labeled("projects", "Projects page with registered project");
let (frame, report) = scenario
.run_with_proof(env.builder())
.expect("scenario execution failed");
let full = Region::full(frame.cols(), frame.rows());
assertion::assert_text_in_region(&frame, "Agentty", &full);
assertion::assert_text_in_region(&frame, "test-project", &full);
common::save_feature_gif(&scenario, &report, &env, "projects_cwd");
}