chore: update test fixtures and frontend for UUID identity (refs #217)
Some checks failed
Deploy to Staging / Build Images (pull_request) Successful in 6m41s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 52s
Deploy to Staging / Verify Staging (pull_request) Failing after 4m7s
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 9s
Some checks failed
Deploy to Staging / Build Images (pull_request) Successful in 6m41s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 52s
Deploy to Staging / Verify Staging (pull_request) Failing after 4m7s
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 9s
Backend test fixtures: - Replace auth0|xxx format with UUID in all test userId values - Update admin tests for new id/userProfileId schema - Add missing deletionRequestedAt/deletionScheduledFor to auth test mocks - Fix admin integration test supertest usage (app.server) Frontend: - AdminUser type: auth0Sub -> id + userProfileId - admin.api.ts: all user management methods use userId (UUID) params - useUsers/useAdmins hooks: auth0Sub -> userId/id in mutations - AdminUsersPage + AdminUsersMobileScreen: user.auth0Sub -> user.id - Remove encodeURIComponent (UUIDs don't need encoding) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
|
||||
describe('Vehicle logging integration', () => {
|
||||
it('should create audit log with vehicle category and correct resource', async () => {
|
||||
const userId = 'test-user-vehicle-123';
|
||||
const userId = '550e8400-e29b-41d4-a716-446655440000';
|
||||
const vehicleId = 'vehicle-uuid-123';
|
||||
const entry = await service.info(
|
||||
'vehicle',
|
||||
@@ -56,7 +56,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should log vehicle update with correct fields', async () => {
|
||||
const userId = 'test-user-vehicle-456';
|
||||
const userId = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
||||
const vehicleId = 'vehicle-uuid-456';
|
||||
const entry = await service.info(
|
||||
'vehicle',
|
||||
@@ -75,7 +75,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should log vehicle deletion with vehicle info', async () => {
|
||||
const userId = 'test-user-vehicle-789';
|
||||
const userId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const vehicleId = 'vehicle-uuid-789';
|
||||
const entry = await service.info(
|
||||
'vehicle',
|
||||
@@ -96,7 +96,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
|
||||
describe('Auth logging integration', () => {
|
||||
it('should create audit log with auth category for signup', async () => {
|
||||
const userId = 'test-user-auth-123';
|
||||
const userId = '550e8400-e29b-41d4-a716-446655440000';
|
||||
const entry = await service.info(
|
||||
'auth',
|
||||
userId,
|
||||
@@ -116,7 +116,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create audit log for password reset request', async () => {
|
||||
const userId = 'test-user-auth-456';
|
||||
const userId = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
||||
const entry = await service.info(
|
||||
'auth',
|
||||
userId,
|
||||
@@ -134,14 +134,14 @@ describe('AuditLog Feature Integration', () => {
|
||||
|
||||
describe('Admin logging integration', () => {
|
||||
it('should create audit log for admin user creation', async () => {
|
||||
const adminId = 'admin-user-123';
|
||||
const targetAdminSub = 'auth0|target-admin-456';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const targetAdminId = '8f14e45f-ceea-367f-a27f-c9a6d0c67e0e';
|
||||
const entry = await service.info(
|
||||
'admin',
|
||||
adminId,
|
||||
'Admin user created: newadmin@example.com',
|
||||
'admin_user',
|
||||
targetAdminSub,
|
||||
targetAdminId,
|
||||
{ email: 'newadmin@example.com', role: 'admin' }
|
||||
);
|
||||
|
||||
@@ -156,14 +156,14 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create audit log for admin revocation', async () => {
|
||||
const adminId = 'admin-user-123';
|
||||
const targetAdminSub = 'auth0|target-admin-789';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const targetAdminId = 'a1b2c3d4-e5f6-7890-1234-567890abcdef';
|
||||
const entry = await service.info(
|
||||
'admin',
|
||||
adminId,
|
||||
'Admin user revoked: revoked@example.com',
|
||||
'admin_user',
|
||||
targetAdminSub,
|
||||
targetAdminId,
|
||||
{ email: 'revoked@example.com' }
|
||||
);
|
||||
|
||||
@@ -174,14 +174,14 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create audit log for admin reinstatement', async () => {
|
||||
const adminId = 'admin-user-123';
|
||||
const targetAdminSub = 'auth0|target-admin-reinstated';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const targetAdminId = 'b2c3d4e5-f6a7-8901-2345-678901bcdef0';
|
||||
const entry = await service.info(
|
||||
'admin',
|
||||
adminId,
|
||||
'Admin user reinstated: reinstated@example.com',
|
||||
'admin_user',
|
||||
targetAdminSub,
|
||||
targetAdminId,
|
||||
{ email: 'reinstated@example.com' }
|
||||
);
|
||||
|
||||
@@ -194,7 +194,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
|
||||
describe('Backup/System logging integration', () => {
|
||||
it('should create audit log for backup creation', async () => {
|
||||
const adminId = 'admin-user-backup-123';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const backupId = 'backup-uuid-123';
|
||||
const entry = await service.info(
|
||||
'system',
|
||||
@@ -215,7 +215,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create audit log for backup restore', async () => {
|
||||
const adminId = 'admin-user-backup-456';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const backupId = 'backup-uuid-456';
|
||||
const entry = await service.info(
|
||||
'system',
|
||||
@@ -233,7 +233,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create error-level audit log for backup failure', async () => {
|
||||
const adminId = 'admin-user-backup-789';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const backupId = 'backup-uuid-789';
|
||||
const entry = await service.error(
|
||||
'system',
|
||||
@@ -253,7 +253,7 @@ describe('AuditLog Feature Integration', () => {
|
||||
});
|
||||
|
||||
it('should create error-level audit log for restore failure', async () => {
|
||||
const adminId = 'admin-user-restore-fail';
|
||||
const adminId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
|
||||
const backupId = 'backup-uuid-restore-fail';
|
||||
const entry = await service.error(
|
||||
'system',
|
||||
|
||||
Reference in New Issue
Block a user