Mail Server Factory Website Testing Suite

This comprehensive testing suite ensures 100% localization coverage and proper functionality of the Mail Server Factory website across all supported languages.

πŸš€ Quick Start

Browser-Based Testing (Development)

Run tests directly in your browser console:

// Run all basic tests
window.websiteTester.runAllTests()

// Run comprehensive localization tests (tests all 29 languages)
window.websiteTester.testLocalization()

// Test language switching functionality
window.websiteTester.testLanguageSwitching()

// Test current language translations
window.websiteTester.testTranslations()

// Test visual elements
window.websiteTester.testVisualElements()

Automated Testing (CI/CD)

Run comprehensive tests programmatically:

# Install dependencies
npm install

# Run all tests against local development server
npm run test:local

# Run tests against any URL
node comprehensive-test-runner.js https://your-website.com

# Run browser-based tests (opens test page)
npm run test:browser

πŸ“‹ Test Coverage

βœ… Functionality Tests

🌍 Localization Tests

πŸ” Quality Assurance

πŸ› οΈ Test Structure

Browser Tests (test-website.js)

Automated Tests (comprehensive-test-runner.js)

πŸ“Š Test Results

Success Criteria

Sample Output

πŸš€ Starting Comprehensive Mail Server Factory Website Tests...
πŸ“ Testing URL: http://localhost:4000
🌍 Languages to test: 29

πŸ”§ Running Basic Functionality Tests...
βœ… [14:30:15] Page loaded successfully
βœ… [14:30:15] Language selector found
βœ… [14:30:15] Hero section found

🌍 Running Comprehensive Localization Tests...

πŸ”„ Testing language: EN
βœ… [14:30:16] [EN] Language set correctly
βœ… [14:30:16] [EN] hero_title translated correctly
βœ… [14:30:16] [EN] features_title translated correctly
...

πŸ† FINAL RESULT: ALL TESTS PASSED! πŸŽ‰

πŸ”§ Configuration

Supported Languages

The test suite validates all languages defined in _data/languages.yml:

en: English
ru: Русский
be: БСларуская
zh: δΈ­ζ–‡
# ... and 25 more languages

Translation Files

Tests validate translations in _data/translations.yml with keys like:

🚨 Troubleshooting

Common Issues

Tests failing due to missing translations:

Language switching not working:

RTL languages not displaying correctly:

Debug Mode

Enable verbose logging:

// In browser console
window.websiteTester.log = function(msg, status) {
    console.log(`[${status.toUpperCase()}] ${msg}`);
};

πŸ“ˆ CI/CD Integration

Add to your CI pipeline:

# GitHub Actions example
- name: Run Website Tests
  run: |
    npm install
    npm run test:local

- name: Upload Test Results
  uses: actions/upload-artifact@v3
  with:
    name: test-results
    path: test-report.json

🎯 Quality Gates

Must Pass Criteria

  1. Zero test failures in any environment
  2. 100% translation coverage for all supported languages
  3. All page elements render correctly in all languages
  4. No English text visible in non-English locales
  5. Proper RTL support for Arabic, Persian, and Hebrew

Performance Benchmarks

πŸ“ž Support

For test failures or questions:


Note: These tests are designed to be run by AI QA systems and ensure complete localization coverage across all supported languages with zero English text leakage.</content> </xai:function_call”>### Uzbek (uz)

_data/translations.yml