import unittest from unittest.mock import patch, MagicMock import sys import os # Add the src directory to the path sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'src')) # Import the frontend components class TestChatbotFrontend(unittest.TestCase): def test_html_structure(self): """Test that the HTML file exists and has the expected structure""" html_path = os.path.join(os.path.dirname(__file__), '..', 'src', 'static', 'index.html') self.assertTrue(os.path.exists(html_path), "Frontend HTML file should exist") with open(html_path, 'r') as f: content = f.read() # Check for essential elements self.assertIn('