-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
import textwrap | ||
|
||
from shiny import ui | ||
from htmltools import HTMLDocument | ||
|
||
|
||
def test_panel_title(): | ||
x = HTMLDocument(ui.panel_title("Hello Shiny UI")).render()["html"] | ||
assert x == textwrap.dedent( | ||
"""\ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<script type="application/html-dependencies">headcontent_648f698a6bce952fe1b165140306e01f4da9e164[0.0]</script> | ||
<title>Hello Shiny UI</title> | ||
</head> | ||
<body> | ||
<h2>Hello Shiny UI</h2> | ||
</body> | ||
</html>""" | ||
) |