-
Notifications
You must be signed in to change notification settings - Fork 4k
[test] Add e2e tests for JS in st.html #12919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ PR preview is ready!
|
6cda50f to
5a3b94a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds E2E testing for JavaScript execution in st.html when the unsafe_allow_javascript=True parameter is enabled. This verifies the functionality of a security-sensitive feature that allows explicit JavaScript execution within HTML content.
- Adds a new test case to verify JavaScript executes when
unsafe_allow_javascript=Trueis set - Adds a new
st.htmlcall in the test app with JavaScript that modifies DOM and sets a global flag - Updates element count constants to reflect the additional HTML element
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| e2e_playwright/st_html.py | Adds a new st.html call with unsafe_allow_javascript=True containing JavaScript that modifies a div's text and sets a window variable |
| e2e_playwright/st_html_test.py | Adds test function to verify JavaScript execution, updates ST_HTML_ELEMENTS count from 10 to 11, and updates related assertions from 8 to 9 |
e54803e to
461b031
Compare
009f855 to
836c521
Compare
461b031 to
0aefd4e
Compare
836c521 to
18ce5b8
Compare
0aefd4e to
a6334cb
Compare
18ce5b8 to
f0aeb02
Compare
a6334cb to
a806dd8
Compare
Merge activity
|
f0aeb02 to
f52ae7b
Compare

Describe your changes
Adds e2e tests for
st.htmlwithunsafe_allow_javascript.GitHub Issue Link (if applicable)
Testing Plan
st_html.pythat includes JavaScript code with the new parameter, and updatedst_html_test.pyto verify that:Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.