Skip to content

Commit

Permalink
Actually show help_text on init ChatFeed (#6506)
Browse files Browse the repository at this point in the history
* Fix help text

* Revert and use self.objects instead
  • Loading branch information
ahuang11 authored Mar 16, 2024
1 parent a23af62 commit ca8cc00
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion panel/chat/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def __init__(self, *objects, **params):
)
# we separate out chat log for the auto scroll feature
self._chat_log = Feed(
*objects,
*self.objects,
load_buffer=self.load_buffer,
auto_scroll_limit=self.auto_scroll_limit,
scroll_button_threshold=self.scroll_button_threshold,
Expand Down
18 changes: 18 additions & 0 deletions panel/tests/ui/chat/test_chat_interface_ui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest

pytest.importorskip("playwright")

from panel.chat import ChatInterface
from panel.tests.util import serve_component

pytestmark = pytest.mark.ui


def test_chat_interface_help(page):
chat_interface = ChatInterface(
help_text="This is a test help text"
)
serve_component(page, chat_interface)
message = page.locator("p")
message_text = message.inner_text()
assert message_text == "This is a test help text"

0 comments on commit ca8cc00

Please sign in to comment.