Skip to content

Conversation

@Rachel602144
Copy link
Contributor

tests: add UI end-to-end tests for example prompts and output panel

  • Added automated UI tests for key PromptView interactions:
    • Clear button resets input to placeholder
    • Surprise Me button inserts a random idea
    • Example prompt buttons insert the correct prompt text
    • Generate button updates the output panel with generated HTML
  • Ensured tests run headless with dummy callbacks
  • Verified tests pass successfully on local environment

Closes #19

Copy link
Member

@PrakharDoneria PrakharDoneria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try running the command pytest
I got the following module not found error

PS D:\Projects\Karbon Desktop> python -u "d:\Projects\Karbon Desktop\ui.py"
invalid command name "1781760714496typewriter_effect"
    while executing
"1781760714496typewriter_effect"
    ("after" script)
invalid command name "1781761260480cycle_colors"
    while executing
"1781761260480cycle_colors"
    ("after" script)
invalid command name "1781761232000update_ai_status_indicator"
    while executing
"1781761232000update_ai_status_indicator"
    ("after" script)
invalid command name "1781761260608animate_welcome"
    while executing
"1781761260608animate_welcome"
    ("after" script)

 *  History restored 

PS D:\Projects\Karbon Desktop> 
 *  History restored 

PS D:\Projects\Karbon Desktop> pytest
================================================================ test session starts =================================================================
platform win32 -- Python 3.13.2, pytest-8.4.1, pluggy-1.6.0
rootdir: D:\Projects\Karbon Desktop
plugins: anyio-4.9.0
collected 5 items / 1 error                                                                                                                           

======================================================================= ERRORS =======================================================================
______________________________________________________ ERROR collecting test_pyautogui_basic.py ______________________________________________________
ImportError while importing test module 'D:\Projects\Karbon Desktop\test_pyautogui_basic.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
D:\Python\Lib\importlib\__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test_pyautogui_basic.py:1: in <module>
    import pyautogui
E   ModuleNotFoundError: No module named 'pyautogui'
============================================================== short test summary info =============================================================== 
ERROR test_pyautogui_basic.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
================================================================== 1 error in 4.53s ================================================================== 
PS D:\Projects\Karbon Desktop> 

@PrakharDoneria PrakharDoneria added the gssoc This issue was assigned as a part of GSSoC 2025 contribution. label Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc This issue was assigned as a part of GSSoC 2025 contribution.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement UI Tests (End-to-End/Acceptance Tests)

2 participants