- 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
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
/* 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()');
|