[refactor] Improve chat input test organization with query parameter navigation#13055
Merged
sfc-gh-nbellante merged 1 commit intodevelopfrom Nov 21, 2025
Merged
Conversation
Contributor
✅ 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. |
Contributor
✅ PR preview is ready!
|
Contributor
Author
| v3 = st.container().chat_input( | ||
| "Chat input 3 (callback)", key="chat_input_3", on_submit=on_submit | ||
| if key is None or key == "width_300": | ||
| width_300_value = st.container().chat_input( |
| st.session_state["chat_input_3"], | ||
|
|
||
| if key is None or key == "width_stretch": | ||
| width_stretch_value = st.container().chat_input( |
1226891 to
9be2bb9
Compare
9be2bb9 to
ee934a3
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the st_chat_input E2E test infrastructure to use query parameters for selective rendering of chat inputs, improving test isolation and organization. The changes replace rendering all chat inputs simultaneously with a query parameter-based approach that displays only one chat input at a time.
Key Changes
- Added query parameter system (
?key=<chat_input_key>) for selective chat input display - Renamed chat input keys from generic names (e.g.,
chat_input_11) to descriptive names (e.g.,audio_with_files) - Updated output formatting pattern from
key value:tokey - value: - Introduced
use_chat_input()decorator andgoto_chat_input()helper for streamlined test navigation - Updated all 40+ test functions to use the new navigation pattern
Reviewed Changes
Copilot reviewed 2 out of 150 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
e2e_playwright/st_chat_input.py |
Refactored test app to conditionally render chat inputs based on query parameter; renamed keys to be descriptive; updated output formatting |
e2e_playwright/st_chat_input_test.py |
Added navigation utilities (use_chat_input decorator, goto_chat_input helper); updated helper functions to use new output format; applied decorator to all test functions |
e2e_playwright/__snapshots__/**/*.png |
Updated snapshot files reflecting the new test isolation approach (all new files) |
ee934a3 to
b81a1f2
Compare
b81a1f2 to
c734cbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe your changes
Refactored the
st_chat_input.pytest app to use query parameters for displaying specific chat inputs. This improves test isolation by allowing tests to focus on a single chat input at a time, rather than rendering all inputs simultaneously. The changes include:use_chat_inputdecorator andgoto_chat_inputhelper function to simplify test navigationScreenshot or video (only for visual changes)
No visual changes to the component itself, only test infrastructure improvements.
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.