Skip to content

Fix CLEAR and UPLOAD action handling - #85

Open
ysss22zz wants to merge 1 commit into
web-arena-x:mainfrom
ysss22zz:fix/clear-upload-actions
Open

Fix CLEAR and UPLOAD action handling#85
ysss22zz wants to merge 1 commit into
web-arena-x:mainfrom
ysss22zz:fix/clear-upload-actions

Conversation

@ysss22zz

Copy link
Copy Markdown

Summary

  • include CLEAR and UPLOAD in action equivalence checks
  • make create_upload_action() return ActionTypes.UPLOAD instead of ActionTypes.TYPE
  • export create_clear_action and create_upload_action from browser_env
  • update action tests and fix the duplicated element_id condition

Problem

ActionTypes.CLEAR and ActionTypes.UPLOAD are defined and used by action serialization, but is_equivalent() does not handle them. This causes test_is_equivalent to raise ValueError for CLEAR.

In addition, create_upload_action() currently creates a TYPE action, and the CLEAR/UPLOAD factory functions are not exported from browser_env, causing round-trip action creation tests to fail.

Testing

pytest -q tests/test_browser_env/test_actions.py

Result

2 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant