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:
23
tests/.backup/debug-email-validation.js.20250908-012049
Normal file
23
tests/.backup/debug-email-validation.js.20250908-012049
Normal file
@@ -0,0 +1,23 @@
|
||||
/* 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
|
||||
Reference in New Issue
Block a user