Files
rxminder/tests/manual/debug-email-validation.js
William Valentin b4a9318324 test: enhance E2E and integration testing infrastructure
- 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
2025-09-07 15:22:33 -07:00

24 lines
911 B
JavaScript

/* eslint-disable no-console */
// Test the email validation in browser console
console.log('Testing email validation for admin@localhost');
const emailRegex = /^[^\s@]+@[^\s@]+(\.[^\s@]+|localhost)$/;
const testEmail = 'admin@localhost';
console.log('Email:', testEmail);
console.log('Regex:', emailRegex.toString());
console.log('Test result:', emailRegex.test(testEmail));
// Let's also test step by step
console.log('Parts breakdown:');
console.log('- Has @ symbol:', testEmail.includes('@'));
console.log('- Before @:', testEmail.split('@')[0]);
console.log('- After @:', testEmail.split('@')[1]);
console.log('- No spaces:', !/\s/.test(testEmail));
// Let's test a simpler regex that should definitely work
const simpleRegex = /^[^@\s]+@[^@\s]+$/;
console.log('Simple regex test:', simpleRegex.test(testEmail));
// Copy this code and paste it in the browser console when you get the validation error