-
Notifications
You must be signed in to change notification settings - Fork 4k
[refactor][TextAlignment] Adds get_caption helper for tests and updates st_markdown_test to new pattern #13035
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
[refactor][TextAlignment] Adds get_caption helper for tests and updates st_markdown_test to new pattern #13035
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. |
✅ PR preview is ready!
|
12a03ee to
592b7d3
Compare
0676383 to
06a7ab5
Compare
592b7d3 to
f0d2c9d
Compare
06a7ab5 to
48076e4
Compare
f0d2c9d to
7d7919f
Compare
48076e4 to
8ba3394
Compare
8ba3394 to
990df6b
Compare
7d7919f to
098964f
Compare
990df6b to
23623d2
Compare
2e3c2d1 to
9386492
Compare
23623d2 to
263f50d
Compare
9386492 to
e771f02
Compare
57b0305 to
8022a6f
Compare
647c794 to
ffcbe27
Compare
2c306e3 to
f4977c3
Compare
ffcbe27 to
a54a40d
Compare
f4977c3 to
3b295db
Compare
a54a40d to
1d5abcb
Compare
3b295db to
c0dfe77
Compare
1d5abcb to
cdf6a3d
Compare
2aaa0c7 to
c88a5dd
Compare
cdf6a3d to
274d56c
Compare
14da0bf to
72c5f0f
Compare
72c5f0f to
d6f02ce
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.
These are larger because I removed the expanders.
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.
These are no longer rendered in expanders.
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.
There are a lot of snapshot updates because the div that is being captured has changed.
lukasmasuch
left a comment
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.
LGTM 👍
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 refactors the st_markdown_test.py E2E test to follow best practices by using label-based locators instead of index-based element access. It introduces a new get_caption helper function and updates the test app structure by removing expander-based organization.
Key Changes:
- Added
get_caption()helper function inapp_utils.pyfor better test element targeting - Refactored width example tests to use
get_markdown()andget_caption()with text-based filtering - Simplified test app by removing expander wrapping, making elements directly accessible
Reviewed Changes
Copilot reviewed 3 out of 69 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
e2e_playwright/shared/app_utils.py |
Adds new get_caption() helper function that locates caption elements by text content using stCaptionContainer test ID |
e2e_playwright/st_markdown_test.py |
Refactors tests to use get_markdown() and get_caption() helpers with regex patterns instead of .nth() index-based access; removes dependency on expander organization |
e2e_playwright/st_markdown.py |
Removes expander wrappers from width examples, flattening the test app structure for direct element access |
e2e_playwright/__snapshots__/**/*.png |
Updated screenshot snapshots reflecting removal of expanders from the test app UI |

Describe your changes
We have two helpers
get_caption(new) andget_markdownthat replace the index based access in thest_markdown_test.GitHub Issue Link (if applicable)
Testing Plan
Test only.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.