Skip to content

Commit 0f452fe

Browse files
committed
Move annotation test from playwright to pytest
1 parent c78174e commit 0f452fe

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from controls import OutputTextVerbatim, Sidebar
22
from playwright.sync_api import Page
33
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
4-
from utils.express_utils import compare_annotations
5-
6-
from shiny import ui
7-
from shiny.express import ui as xui
84

95
app_url = create_deploys_app_url_fixture("express_page_sidebar")
106

@@ -17,4 +13,3 @@ def test_express_page_sidebar(page: Page, app_url: str) -> None:
1713
sidebar.expect_text("SidebarTitle Sidebar Content")
1814
output_txt = OutputTextVerbatim(page, "txt")
1915
output_txt.expect_value("50")
20-
compare_annotations(ui.sidebar, xui.sidebar)

tests/playwright/utils/express_utils.py renamed to tests/pytest/test_express_annotations.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ def compare_annotations(
2929
assert (
3030
ui_a[key] == layout_a[key]
3131
), f"Type annotations for {key} in {core_fn} (Core) don't match {express_fn} (Express)"
32+
33+
34+
def test_sidebar_annotations() -> None:
35+
from shiny import ui
36+
from shiny.express import ui as xui
37+
38+
compare_annotations(ui.sidebar, xui.sidebar)

0 commit comments

Comments
 (0)