Successfully completed E2E testing of the registration and login flows. Identified and fixed 3 critical backend issues that were blocking the entire user flow. The application is now functional for basic authentication operations.
Problem: Frontend running on port 4201 but CORS only allowed port 4200
Location: backend/src/main/resources/application.yml:56
Fix: Added http://localhost:4201 to allowed origins
Impact: Was blocking all frontend requests to backend
Problem: User entity requires username field but registration wasn't providing it
Location: backend/src/main/java/nl/glorylabs/service/AuthService.java:65
Error: NULL not allowed for column "USERNAME"
Fix: Set username to email address during user creation
Impact: All registration attempts were failing with 500 error
Problem: Using Set.of() creates immutable set, causing UnsupportedOperationException
Location: backend/src/main/java/nl/glorylabs/service/AuthService.java:73
Fix: Changed to new HashSet<>(Set.of(User.Role.USER))
Impact: Users were created but request failed after save
Endpoint: POST /api/api/auth/register
Status: PASSING
Request:
{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe6@test.com",
"password": "MySecureP@ssw0rd2025!"
}
Response (200 OK):
{
"accessToken": "eyJhbGciOiJIUzI1NiJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiJ9...",
"tokenType": "Bearer",
"expiresIn": 86400000,
"user": {
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john.doe6@test.com",
"roles": ["USER"],
"emailVerified": false,
"active": true
}
}
Notes:
Endpoint: POST /api/api/auth/login
Status: PASSING
Request:
{
"email": "john.doe6@test.com",
"password": "MySecureP@ssw0rd2025!"
}
Response (200 OK):
{
"accessToken": "eyJhbGciOiJIUzI1NiJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiJ9...",
"tokenType": "Bearer",
"expiresIn": 86400000,
"user": {
"id": 1,
"lastLoginAt": "2025-10-19T09:04:29.692452",
...
}
}
Notes:
lastLoginAt timestamp updated correctlyThe backend uses /api as servlet context path (configured in application.yml:46), meaning:
/api/api/* (context path + controller mapping)/api/api/auth/registerTest CV Builder E2E:
Test PDF Generation:
Frontend Integration Test:
Fix Checkstyle Issues: Clean up import order violations before deployment
Status: 🎉 MAJOR SUCCESS
The critical authentication flow is now fully functional. All blocking issues have been resolved:
The application is ready for:
Next Priority: Test the CV Builder data submission flow and PDF generation to complete the full E2E user journey.
Reacties