From 2465141a18135a0e23e5d6717c089dd976d21688 Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Sun, 19 Apr 2026 10:08:52 +0300 Subject: [PATCH] test: fix data-testid attribute names and update E2E test URLs to port 8917 --- .claude/settings.local.json | 14 +- frontend/app/login/page.tsx | 3 +- frontend/e2e/workflows/1-login.spec.ts | 2 +- frontend/e2e/workflows/2-scan-adjust.spec.ts | 2 +- .../e2e/workflows/3-ai-extraction.spec.ts | 2 +- .../e2e/workflows/4-admin-settings.spec.ts | 2 +- frontend/e2e/workflows/5-offline-sync.spec.ts | 2 +- ...7704f08187bb24583d69722bc9166fbc34100e.png | Bin 0 -> 25825 bytes ...5d52a987bf605d34ced01f09c8c6347b7c781b.md} | 67 +++++++-- frontend/playwright-report/index.html | 90 ++++++++++++ frontend/playwright.config.ts | 8 +- frontend/public/sw.js | 2 +- frontend/test-results/.last-run.json | 6 + .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 63 +++++++- .../test-failed-1.png | Bin 4254 -> 25825 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 136 ----------------- .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 137 ------------------ .../test-failed-1.png | Bin 4254 -> 0 bytes .../error-context.md | 137 ------------------ .../test-failed-1.png | Bin 4254 -> 0 bytes 47 files changed, 235 insertions(+), 2206 deletions(-) create mode 100644 frontend/playwright-report/data/877704f08187bb24583d69722bc9166fbc34100e.png rename frontend/{test-results/1-login-Login-Workflow-sho-0bb23-e-network-errors-gracefully-chromium/error-context.md => playwright-report/data/d85d52a987bf605d34ced01f09c8c6347b7c781b.md} (72%) create mode 100644 frontend/playwright-report/index.html create mode 100644 frontend/test-results/.last-run.json delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-0bb23-e-network-errors-gracefully-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1065a-n-LDAP-and-local-login-tabs-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1065a-n-LDAP-and-local-login-tabs-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-19d2a-hen-clicking-user-from-list-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-19d2a-hen-clicking-user-from-list-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1b0d7-alid-local-user-credentials-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1b0d7-alid-local-user-credentials-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1def4-alid-local-user-credentials-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-1def4-alid-local-user-credentials-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-24db1-with-valid-LDAP-credentials-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-24db1-with-valid-LDAP-credentials-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-2cf04-session-across-page-reloads-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-2cf04-session-across-page-reloads-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-6d596-sername-and-password-fields-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-6d596-sername-and-password-fields-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-77e03-dmin-button-for-admin-users-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-77e03-dmin-button-for-admin-users-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-8b7ad-tity-after-successful-login-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-8b7ad-tity-after-successful-login-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-8fef9-login-preference-on-revisit-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-a6e06-ct-invalid-LDAP-credentials-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-a6e06-ct-invalid-LDAP-credentials-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-d35b6-ser-list-in-local-login-tab-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-sho-d35b6-ser-list-in-local-login-tab-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-should-reject-empty-login-credentials-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-should-reject-empty-login-credentials-chromium/test-failed-1.png delete mode 100644 frontend/test-results/1-login-Login-Workflow-should-support-logout-functionality-chromium/error-context.md delete mode 100644 frontend/test-results/1-login-Login-Workflow-should-support-logout-functionality-chromium/test-failed-1.png delete mode 100644 frontend/test-results/2-scan-adjust-Scan-and-Adj-4dfc2-ld-display-scan-input-field-chromium/error-context.md delete mode 100644 frontend/test-results/2-scan-adjust-Scan-and-Adj-4dfc2-ld-display-scan-input-field-chromium/test-failed-1.png delete mode 100644 frontend/test-results/2-scan-adjust-Scan-and-Adj-ce512--interface-with-camera-view-chromium/error-context.md delete mode 100644 frontend/test-results/2-scan-adjust-Scan-and-Adj-ce512--interface-with-camera-view-chromium/test-failed-1.png diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 6d851f98..67f022f4 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -52,7 +52,19 @@ "Bash(sed -i 's|\"/api/items|\"/items|g' backend/tests/test_items.py)", "Bash(sed -i 's|\"/api/categories|\"/categories|g' backend/tests/test_categories.py)", "Bash(sed -i 's|\"/api/operations|\"/operations|g' backend/tests/test_operations.py)", - "Bash(sed -i 's|\"/api/operations|\"/operations|g' backend/tests/test_offline_sync.py)" + "Bash(sed -i 's|\"/api/operations|\"/operations|g' backend/tests/test_offline_sync.py)", + "Bash(curl -sf http://localhost:8906/)", + "Bash(curl -sf http://localhost:3000/)", + "Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3000/)", + "Bash(NEXT_PUBLIC_API_URL=http://localhost:8906 npm run dev -- --port 3000)", + "Bash(echo \"Frontend PID: $!\")", + "Bash(curl -sf http://localhost:3000)", + "Bash(curl -s http://localhost:3000/login)", + "Bash(curl -s http://localhost:8906/users)", + "Bash(curl -v http://localhost:8906/users)", + "Bash(NEXT_PUBLIC_API_URL=http://localhost:8916 npm run dev -- --port 8917)", + "Bash(curl -sf http://localhost:8917)", + "Bash(xargs sed *)" ] } } diff --git a/frontend/app/login/page.tsx b/frontend/app/login/page.tsx index 4e7103e1..83996175 100644 --- a/frontend/app/login/page.tsx +++ b/frontend/app/login/page.tsx @@ -124,7 +124,7 @@ export default function LoginPage() {