Files
HereIAm/tests/test_visual_dialog.py
2025-08-01 12:28:58 -04:00

54 lines
1.5 KiB
Python

#!/usr/bin/env python3
"""
Visual test for the Options Dialog with Open Logs button.
Run this to see the dialog with the new button.
"""
import sys
import os
# Add src directory to path
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'src'))
from PyQt5 import QtWidgets
from options_dialog import OptionsDialog
from logging_config import setup_logging, get_logger
def main():
"""Show the options dialog visually for testing"""
setup_logging(debug=True)
logger = get_logger(__name__)
print("🧪 Visual Test: Options Dialog with Open Logs Button")
print("========================================")
print("This will open the options dialog so you can test the 'Open Logs Directory' button")
print("Click the button to open the logs directory in Finder")
print("Close the dialog when done testing")
print("")
# Create a QApplication instance
app = QtWidgets.QApplication(sys.argv)
# Create the options dialog
dialog = OptionsDialog(
current_wait_time=240,
current_start_enabled=True,
current_log_level="INFO",
current_move_px=10,
current_launch_at_startup=False,
parent=None
)
print("✅ Options dialog created with the new 'Open Logs Directory' button")
print("📂 The button should be visible above the Save/Cancel buttons")
# Show the dialog
dialog.show()
result = app.exec_()
print("✅ Test completed!")
return result
if __name__ == "__main__":
main()