- Add comprehensive TypeScript types to E2E test helpers - Improve medication, auth, modal, and wait helper classes with proper typing - Enhance test data with readonly type assertions for better immutability - Update integration tests with better error handling and assertions - Improve Playwright type definitions for better IDE support - Add environment variable support to manual test scripts
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
/* 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()');
|