This pull request includes several changes to improve the testing framework and streamline the code in the src/agent directory. The most important changes include updating the testing framework from Cypress to Playwright, modifying subprocess commands for consistency, and ensuring the correct handling of test directories and unique image files.
Framework Update:
config.toml: Changed the testing framework from Cypress to Playwright.
This pull request includes several changes to improve the testing framework and streamline the code in the
src/agent
directory. The most important changes include updating the testing framework from Cypress to Playwright, modifying subprocess commands for consistency, and ensuring the correct handling of test directories and unique image files.Framework Update:
config.toml
: Changed the testing framework from Cypress to Playwright.Subprocess Command Modifications:
src/agent/scaffold.py
: Updated subprocess commands to use a consistent format without list brackets fornode
,npm
,playwright
, andcypress
commands. [1] [2] [3] [4] [5] [6] [7] [8] [9]Directory Handling:
src/agent/tools.py
: Ensured thetests
directory exists when writing code and running tests for Playwright. [1] [2]src/agent/utils.py
: Added code to ensure thetest_dir
exists before running Playwright tests.Image Handling:
src/agent/video.py
: Renamedfind_unique_images
tokeep_unique_images
and extended it to handle multiple image formats (png
,jpeg
,jpg
,webp
). [1] [2]src/agent/utils.py
: Integratedkeep_unique_images
into the screenshot checking process to handle additional image formats. [1] [2]Minor Changes:
src/agent/cli/init.py
: Removed the redundantHEADLESS
environment variable initialization.src/agent/utils.py
: Importedkeep_unique_images
fromagent.video
.