Skip to content

[feat] Utilize pytest.mark.external_test in 2 tests#13738

Merged
sfc-gh-bnisco merged 1 commit intodevelopfrom
01-22-_feat_add_external_tests
Feb 12, 2026
Merged

[feat] Utilize pytest.mark.external_test in 2 tests#13738
sfc-gh-bnisco merged 1 commit intodevelopfrom
01-22-_feat_add_external_tests

Conversation

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco commented Jan 29, 2026

Describe your changes

Added the @pytest.mark.external_test decorator to tests that should run in external test environments. Updated the mega_tester_app_test.py and st_text_test.py to use the AppTarget fixture instead of directly using the Page object.

Testing Plan

  • Will be run in CI and in SiS vNext tests

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Jan 29, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@sfc-gh-bnisco sfc-gh-bnisco added change:feature PR contains new feature or enhancement implementation impact:internal PR changes only affect internal code security-assessment-completed labels Jan 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 29, 2026

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13738/streamlit-1.54.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13738.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 the @pytest.mark.external_test decorator to two test functions to enable them to run in external test environments (e.g., SiS vNext). The tests are updated to use the AppTarget fixture instead of the Page object, which provides a stable abstraction that works across local, external direct, and external host (iframe) modes.

Changes:

  • Added @pytest.mark.external_test to test_help_tooltip_works in st_text_test.py and test_no_console_errors in mega_tester_app_test.py
  • Updated both tests to use the AppTarget fixture instead of Page, enabling them to work in external test environments
  • Removed unused imports and parameters that are no longer needed with AppTarget

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
e2e_playwright/st_text_test.py Added @pytest.mark.external_test to test_help_tooltip_works and migrated from Page to AppTarget fixture
e2e_playwright/mega_tester_app_test.py Added @pytest.mark.external_test(upload_test_assets=True) to test_no_console_errors and migrated from Page/app_port to AppTarget fixture with proper reload and wait logic

@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch from 05ab0e4 to 5f43c64 Compare January 29, 2026 05:51
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_app_target branch from 2fa0058 to 8bdee90 Compare January 29, 2026 05:51
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch from 5f43c64 to 5c81234 Compare January 29, 2026 06:00
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_app_target branch 2 times, most recently from eaa3de0 to 83ca0ac Compare January 29, 2026 19:16
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch 2 times, most recently from 1968bfb to 696cc5b Compare January 29, 2026 20:48
@sfc-gh-bnisco sfc-gh-bnisco marked this pull request as ready for review January 29, 2026 22:06


def test_no_console_errors(page: Page, app_port: int, browser_name: str):
@pytest.mark.external_test(upload_test_assets=True)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: What does upload_test_assets do? Could be added to the AGENTS.md file with a brief explanation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added guidance in the code and updated the AGENTS.md file to refer to the code for documentation.

Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch from 696cc5b to 8c8547b Compare February 4, 2026 21:34
@sfc-gh-bnisco sfc-gh-bnisco requested a review from a team as a code owner February 4, 2026 21:34
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_app_target branch from 83ca0ac to 9bdbbc0 Compare February 4, 2026 21:34
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_app_target branch from 9bdbbc0 to 5383b0c Compare February 12, 2026 00:42
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch from 8c8547b to 1ebc6fd Compare February 12, 2026 00:42
@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Feb 12, 2026

Merge activity

  • Feb 12, 8:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 12, 9:10 PM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 12, 9:26 PM UTC: @sfc-gh-bnisco merged this pull request with Graphite.

@sfc-gh-bnisco sfc-gh-bnisco changed the base branch from 01-22-_feat_add_app_target to graphite-base/13738 February 12, 2026 20:26
@sfc-gh-bnisco sfc-gh-bnisco changed the base branch from graphite-base/13738 to develop February 12, 2026 21:08
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the 01-22-_feat_add_external_tests branch from 1ebc6fd to 212ccab Compare February 12, 2026 21:09
@sfc-gh-bnisco sfc-gh-bnisco merged commit 2a255f6 into develop Feb 12, 2026
43 checks passed
@sfc-gh-bnisco sfc-gh-bnisco deleted the 01-22-_feat_add_external_tests branch February 12, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:feature PR contains new feature or enhancement implementation impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants