Skip to content
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

Redraw if stylesheets is empty #6365

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions panel/tests/ui/pane/test_markup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from html import escape

import pytest

pytest.importorskip("playwright")

from playwright.sync_api import expect

from panel.models import HTML
from panel.pane import Markdown
from panel.tests.util import serve_component, wait_until

Expand Down Expand Up @@ -85,3 +88,12 @@ def test_markdown_pane_visible_toggle(page):
md.visible = True

wait_until(lambda: page.locator(".markdown").locator("div").is_visible(), page)

def test_html_model(page):
hoxbro marked this conversation as resolved.
Show resolved Hide resolved
text = "<h1>Header</h1>"
html = HTML(text=escape(text), width=200, height=200)
serve_component(page, html)

header_element = page.locator('h1:has-text("Header")')
assert header_element.is_visible()
assert header_element.text_content() == "Header"
Loading