🎉 Improved form testing infrastructure with new files: 'simple_form_tester.py', 'ui_components.html' templates, and updated test suite in 'form_test_automator.py'. 📚
This commit is contained in:
@@ -30,6 +30,10 @@ try:
|
||||
except ImportError:
|
||||
PLAYWRIGHT_AVAILABLE = False
|
||||
print("⚠️ Playwright nicht verfügbar. Installiere mit: pip install playwright")
|
||||
# Fallback-Klassen für Type Hints
|
||||
class Page: pass
|
||||
class Browser: pass
|
||||
class BrowserContext: pass
|
||||
|
||||
# Test-Daten-Generierung
|
||||
try:
|
||||
@@ -38,6 +42,20 @@ try:
|
||||
except ImportError:
|
||||
FAKER_AVAILABLE = False
|
||||
print("⚠️ Faker nicht verfügbar. Installiere mit: pip install faker")
|
||||
# Fallback-Klasse
|
||||
class Faker:
|
||||
def __init__(self, locale='de_DE'): pass
|
||||
def email(self): return "test@example.com"
|
||||
def name(self): return "Test User"
|
||||
def first_name(self): return "Test"
|
||||
def last_name(self): return "User"
|
||||
def company(self): return "Test Company"
|
||||
def city(self): return "Test City"
|
||||
def street_address(self): return "Test Street 123"
|
||||
def phone_number(self): return "+49 123 4567890"
|
||||
def url(self): return "https://example.com"
|
||||
def date(self): return "2024-06-18"
|
||||
def text(self, max_nb_chars=200): return "Test text"
|
||||
|
||||
# HTML-Parsing
|
||||
try:
|
||||
@@ -46,6 +64,9 @@ try:
|
||||
except ImportError:
|
||||
BS4_AVAILABLE = False
|
||||
print("⚠️ BeautifulSoup nicht verfügbar. Installiere mit: pip install beautifulsoup4")
|
||||
# Fallback-Klasse
|
||||
class BeautifulSoup:
|
||||
def __init__(self, *args, **kwargs): pass
|
||||
|
||||
# Rich Console für schöne Ausgabe
|
||||
try:
|
||||
@@ -59,6 +80,13 @@ try:
|
||||
except ImportError:
|
||||
RICH_AVAILABLE = False
|
||||
console = None
|
||||
# Fallback-Klassen
|
||||
class Console:
|
||||
def print(self, *args, **kwargs): print(*args)
|
||||
class Table:
|
||||
def __init__(self, *args, **kwargs): pass
|
||||
def add_column(self, *args, **kwargs): pass
|
||||
def add_row(self, *args, **kwargs): pass
|
||||
|
||||
|
||||
class TestStatus(Enum):
|
||||
|
Reference in New Issue
Block a user