[
  {
    "actions": [
      {
        "action": "navigate",
        "type": "navigate",
        "url": "{base_url}/"
      },
      {
        "action": "wait_for",
        "selector": "a[href=\"/resource-manager\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "a[href=\"/resource-manager\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"tab-navigation-set-active-tab-button-planning\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"tab-navigation-set-active-tab-button-planning\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"project-planning-grid-project-filter-trigger\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"project-planning-grid-project-filter-trigger\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"project-planning-grid-project-id-option\"]",
        "timeout_ms": 15000,
        "type": "wait_for_selector"
      },
      {
        "action": "assert_selector",
        "selector": "[data-testid=\"project-planning-grid-project-id-option\"]",
        "type": "assert_selector"
      },
      {
        "text": "Filter by Project",
        "type": "assert_text"
      },
      {
        "text": "Manage electrician and engineer availability",
        "type": "assert_text"
      }
    ],
    "capture_each_step": true,
    "expected_result": "From the authenticated dashboard root, the user clicks the Resource Manager sidebar link, switches to the Project Planning tab, and opens the \"Filter by Project\" dropdown. The dropdown now lists every project that has a work activity (from /api/resources/work-activities, which already runs on mount), not just the projects that have rows in the planning grid itself. Pre-fix: getUniqueProjects() only walked the loaded tasks, so projects with no planning rows yet (the ones the user wanted to \"add timing plans\" to) were missing from the dropdown. Post-fix: the function merges projects from tasks AND from activities, dedupes by project reference, and sorts descending by reference, so newly selectable projects appear at the top of the list.",
    "human_journey": true,
    "name": "project-planning-grid-shows-all-active-projects-in-filter-2026-06-18",
    "path": "/resource-manager",
    "selectors": [],
    "source": "proof_contract",
    "start_path": "/",
    "texts": [
      "Manage electrician and engineer availability"
    ]
  },
  {
    "actions": [
      {
        "action": "navigate",
        "type": "navigate",
        "url": "{base_url}/"
      },
      {
        "action": "wait_for",
        "selector": "a[href=\"/resource-manager\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "a[href=\"/resource-manager\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"tab-navigation-set-active-tab-button-planning\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"tab-navigation-set-active-tab-button-planning\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"project-planning-grid-project-filter-trigger\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"project-planning-grid-project-filter-trigger\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "[data-testid=\"project-planning-grid-project-id-option\"]",
        "timeout_ms": 15000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"project-planning-grid-project-id-option\"]:nth-of-type(2)",
        "type": "click"
      },
      {
        "selector": "[data-testid=\"project-planning-grid-popout-button\"]",
        "timeout_ms": 30000,
        "type": "click_popup",
        "wait_for_selector": "[data-testid=\"project-planning-grid-locked-project-name\"]"
      },
      {
        "text": "Manage electrician and engineer availability",
        "type": "assert_text"
      }
    ],
    "capture_each_step": true,
    "expected_result": "From the authenticated dashboard root, the user clicks the Resource Manager sidebar link, switches to the Project Planning tab, opens the Filter by Project dropdown, picks the SECOND project (deliberately not the auto-defaulted first project), and clicks Pop out. Post-fix the onClick in ProjectPlanningGrid.jsx constructs `/popup/planner/<selectedProjectId>`, so the popped-out tab locks to that project via the existing /popup/planner/:projectId route (App.js line 250). The locked project UI hides the Filter by Project dropdown and shows the locked project label (data-testid=\"project-planning-grid-locked-project-name\", NEW in this fix). Pre-fix the URL was `/popup/planner` (no project id), so the popped-out tab rendered the cross-project grid, the dropdown was visible, and the locked-project label was absent \u2192 wait_for_selector times out \u2192 FAIL. The source-page click on the popout button is unchanged.",
    "human_journey": true,
    "name": "popout-preserves-selected-project-2026-06-18",
    "path": "/resource-manager",
    "selectors": [],
    "source": "proof_contract",
    "start_path": "/",
    "texts": [
      "Manage electrician and engineer availability"
    ]
  }
]