{
  "run_id": "20261030T1420",
  "story_id": "US-004",
  "title": "创建任务",
  "environment": "dev",
  "base_url": "http://localhost:5173",
  "api_base_url": "http://localhost:8080/api/v1",
  "commit": "abc1234",
  "browser": "Google Chrome 142.0.0.0",
  "account": "e2e-user@example.com",
  "data_prefix": "e2e-20261030T1420-US004-",
  "started_at": "2026-10-30T14:20:00+08:00",
  "finished_at": "2026-10-30T14:26:12+08:00",
  "result": "pass",
  "acceptance_criteria": [
    {
      "id": "AC-1",
      "description": "正常创建任务",
      "step": 5,
      "result": "pass"
    },
    {
      "id": "AC-2",
      "description": "标题为空时显示校验错误",
      "step": 4,
      "result": "pass"
    },
    {
      "id": "AC-3",
      "description": "无权限用户返回 403 提示",
      "step": 6,
      "result": "pass"
    }
  ],
  "console_errors": [],
  "network_errors": [],
  "request_ids": [
    "01J8Z3K4M5N6P7Q8R9S0T1U2V3"
  ],
  "steps": [
    {
      "index": 1,
      "action": "navigate",
      "target": "http://localhost:5173/login",
      "expected": "登录页加载",
      "actual": "登录页加载，标题为“登录 - TeamTask”",
      "status": "pass",
      "screenshot": "screens/US-004/step-01-login.png",
      "assertions": [
        {
          "type": "js",
          "expression": "document.title",
          "expected": "登录 - TeamTask",
          "actual": "登录 - TeamTask"
        }
      ],
      "notes": ""
    },
    {
      "index": 2,
      "action": "fill",
      "target": "input[name=email], input[name=password]",
      "expected": "填写测试账号",
      "actual": "已填写",
      "status": "pass",
      "screenshot": "screens/US-004/step-02-filled.png",
      "assertions": [
        {
          "type": "js",
          "expression": "document.querySelector('input[name=email]').value",
          "expected": "e2e-user@example.com",
          "actual": "e2e-user@example.com"
        }
      ],
      "notes": "密码不记录"
    },
    {
      "index": 3,
      "action": "click",
      "target": "[data-testid=login-submit]",
      "expected": "登录成功，进入项目列表",
      "actual": "URL 变为 /projects",
      "status": "pass",
      "screenshot": "screens/US-004/step-03-projects.png",
      "assertions": [
        {
          "type": "js",
          "expression": "location.pathname",
          "expected": "/projects",
          "actual": "/projects"
        }
      ],
      "notes": ""
    },
    {
      "index": 4,
      "action": "submit-empty-title",
      "target": "[data-testid=create-task-modal]",
      "expected": "显示标题必填错误",
      "actual": "标题下方显示“标题不能为空”",
      "status": "pass",
      "screenshot": "screens/US-004/step-04-validation.png",
      "assertions": [
        {
          "type": "js",
          "expression": "document.querySelector('[data-testid=title-error]')?.textContent?.trim()",
          "expected": "标题不能为空",
          "actual": "标题不能为空"
        }
      ],
      "notes": ""
    },
    {
      "index": 5,
      "action": "create-task",
      "target": "[data-testid=create-task-submit]",
      "expected": "返回 201，弹窗关闭，看板出现新卡片",
      "actual": "返回 201，卡片出现，标题正确",
      "status": "pass",
      "screenshot": "screens/US-004/step-05-created.png",
      "assertions": [
        {
          "type": "network",
          "expression": "POST /api/v1/tasks",
          "expected": "201",
          "actual": "201"
        },
        {
          "type": "js",
          "expression": "document.querySelectorAll('[data-testid=task-card]').length",
          "expected": "1",
          "actual": "1"
        }
      ],
      "notes": "request_id=01J8Z3K4M5N6P7Q8R9S0T1U2V3"
    },
    {
      "index": 6,
      "action": "no-permission",
      "target": "viewer 账号尝试创建任务",
      "expected": "返回 403，页面显示无权限提示",
      "actual": "返回 403，显示“你没有权限在该项目中创建任务”",
      "status": "pass",
      "screenshot": "screens/US-004/step-06-forbidden.png",
      "assertions": [
        {
          "type": "network",
          "expression": "POST /api/v1/tasks",
          "expected": "403",
          "actual": "403"
        }
      ],
      "notes": ""
    }
  ],
  "defects": []
}
