🔧 [GLOBAL SETUP] Starting global setup...
🔧 [GLOBAL SETUP] Using test user: e2e@test.com
🔧 [GLOBAL SETUP] Verifying API availability...
🔧 [GLOBAL SETUP] API URL: http://localhost:8080/api/v1
🔧 [GLOBAL SETUP] Navigating to frontend...
🔧 [GLOBAL SETUP] Attempting API login via browser...
{
  "config": {
    "configFile": "/home/senke/git/talas/veza/apps/web/playwright.config.ts",
    "rootDir": "/home/senke/git/talas/veza/apps/web/e2e",
    "forbidOnly": false,
    "fullyParallel": true,
    "globalSetup": "/home/senke/git/talas/veza/apps/web/e2e/global-setup.ts",
    "globalTeardown": null,
    "globalTimeout": 0,
    "grep": {},
    "grepInvert": null,
    "maxFailures": 0,
    "metadata": {},
    "preserveOutput": "always",
    "reporter": [
      [
        "json"
      ]
    ],
    "reportSlowTests": {
      "max": 5,
      "threshold": 300000
    },
    "quiet": false,
    "projects": [
      {
        "outputDir": "/home/senke/git/talas/veza/apps/web/test-results",
        "repeatEach": 1,
        "retries": 0,
        "metadata": {},
        "id": "chromium",
        "name": "chromium",
        "testDir": "/home/senke/git/talas/veza/apps/web/e2e",
        "testIgnore": [],
        "testMatch": [
          "**/*.@(spec|test).?(c|m)[jt]s?(x)"
        ],
        "timeout": 60000
      },
      {
        "outputDir": "/home/senke/git/talas/veza/apps/web/test-results",
        "repeatEach": 1,
        "retries": 0,
        "metadata": {},
        "id": "firefox",
        "name": "firefox",
        "testDir": "/home/senke/git/talas/veza/apps/web/e2e",
        "testIgnore": [],
        "testMatch": [
          "**/*.@(spec|test).?(c|m)[jt]s?(x)"
        ],
        "timeout": 60000
      },
      {
        "outputDir": "/home/senke/git/talas/veza/apps/web/test-results",
        "repeatEach": 1,
        "retries": 0,
        "metadata": {},
        "id": "webkit",
        "name": "webkit",
        "testDir": "/home/senke/git/talas/veza/apps/web/e2e",
        "testIgnore": [],
        "testMatch": [
          "**/*.@(spec|test).?(c|m)[jt]s?(x)"
        ],
        "timeout": 60000
      },
      {
        "outputDir": "/home/senke/git/talas/veza/apps/web/test-results",
        "repeatEach": 1,
        "retries": 0,
        "metadata": {},
        "id": "msedge",
        "name": "msedge",
        "testDir": "/home/senke/git/talas/veza/apps/web/e2e",
        "testIgnore": [],
        "testMatch": [
          "**/*.@(spec|test).?(c|m)[jt]s?(x)"
        ],
        "timeout": 60000
      }
    ],
    "shard": null,
    "tags": [],
    "updateSnapshots": "missing",
    "updateSourceMethod": "patch",
    "version": "1.57.0",
    "workers": 1,
    "webServer": {
      "command": "npm run dev",
      "url": "http://localhost:5173",
      "reuseExistingServer": true,
      "timeout": 120000
    }
  },
  "suites": [],
  "errors": [
    {
      "message": "Error: API login failed: HTTP 401: {\"success\":false,\"error\":{\"code\":1004,\"message\":\"Invalid credentials\",\"request_id\":\"8ceccab7-aa3c-4162-8d9f-a60d44380326\",\"timestamp\":\"2026-01-07T17:28:45Z\"}}",
      "stack": "Error: API login failed: HTTP 401: {\"success\":false,\"error\":{\"code\":1004,\"message\":\"Invalid credentials\",\"request_id\":\"8ceccab7-aa3c-4162-8d9f-a60d44380326\",\"timestamp\":\"2026-01-07T17:28:45Z\"}}\n    at globalSetup (/home/senke/git/talas/veza/apps/web/e2e/global-setup.ts:149:13)",
      "location": {
        "file": "/home/senke/git/talas/veza/apps/web/e2e/global-setup.ts",
        "column": 13,
        "line": 149
      },
      "snippet": "\u001b[90m   at \u001b[39mglobal-setup.ts:149\n\n  147 |       console.error(`   - Test user exists: ${testUser.email}`);\n  148 |       console.error(`   - CORS is configured correctly`);\n> 149 |       throw new Error(`API login failed: ${errorMsg}`);\n      |             ^\n  150 |     }\n  151 |\n  152 |     console.log('✅ [GLOBAL SETUP] API login successful!');"
    }
  ],
  "stats": {
    "startTime": "2026-01-07T17:28:43.701Z",
    "duration": 2404.9370000000004,
    "expected": 0,
    "skipped": 0,
    "unexpected": 0,
    "flaky": 0
  }
}
