feat: add automated test cleanup infrastructure

- Add cleanup-tests.sh script for automated test reorganization
- Safely backup manual test files with timestamps in tests/.backup/
- Generate cleanup-report.json with migration metrics
- Validate test structure after cleanup
- Log detailed cleanup progress and results

Enables safe migration from manual to automated testing
This commit is contained in:
William Valentin
2025-09-08 01:38:49 -07:00
parent d3c7513600
commit 1f62ffb3d8
5 changed files with 574 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/* eslint-disable no-console */
// Simple test script to verify admin login functionality
// Run this in the browser console to test admin credentials
async function testAdminLogin() {
console.log('🧪 Testing admin login...');
// Import the services (this won't work directly, but helps us understand the flow)
console.log('Admin credentials:');
console.log('Email: admin@localhost');
console.log('Password: admin123!');
// Check if admin user exists in localStorage
const users = JSON.parse(localStorage.getItem('users') || '[]');
console.log('All users in localStorage:', users);
const adminUser = users.find(u => u.email === 'admin@localhost');
console.log('Admin user found:', adminUser);
if (adminUser) {
console.log('Admin user details:');
console.log('- Email:', adminUser.email);
console.log('- Password:', adminUser.password);
console.log('- Role:', adminUser.role);
console.log('- Status:', adminUser.status);
console.log('- Email Verified:', adminUser.emailVerified);
} else {
console.log('❌ Admin user not found in localStorage');
}
}
// Instructions
console.log('Copy and paste this function in browser console:');
console.log(testAdminLogin.toString());
console.log('Then run: testAdminLogin()');