Skip to content

Commit 2a84b36

Browse files
committed
Add Playwright test for OutputTextVerbatim component
1 parent c106374 commit 2a84b36

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from conftest import create_doc_example_core_fixture
2+
from playwright.sync_api import Page
3+
4+
from shiny.playwright import controller
5+
from shiny.run import ShinyAppProc
6+
7+
app = create_doc_example_core_fixture("input_text")
8+
9+
10+
def test_output_text_verbatim_input_text_example(page: Page, app: ShinyAppProc) -> None:
11+
page.goto(app.url)
12+
13+
caption = controller.InputText(page, "caption")
14+
verbatim = controller.OutputTextVerbatim(page, "value")
15+
16+
verbatim.expect_has_placeholder(False)
17+
verbatim.expect_value("Data summary")
18+
19+
new_value = "Updated summary 123"
20+
caption.set(new_value)
21+
22+
verbatim.expect_value(new_value)

0 commit comments

Comments
 (0)