agentty 0.7.2

Agentty is an ADE (Agentic Development Environment) for structured, controllable AI-assisted software development.
Documentation
//! Projects page E2E tests: project listing with current working directory.

use testty::assertion;
use testty::region::Region;
use testty::scenario::Scenario;

use crate::common;
use crate::common::BuilderEnv;

/// Verify that the Projects tab lists the registered project name from
/// the temp workdir.
///
/// Agentty auto-registers the current working directory as a project on
/// startup. The test creates a `test-project` working directory and asserts
/// that the project name appears in the project list.
#[test]
fn projects_page_shows_cwd() {
    // Arrange
    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");

    // Act
    let (frame, report) = scenario
        .run_with_proof(env.builder())
        .expect("scenario execution failed");

    // Assert — Projects tab is selected (default startup tab).
    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");
}