feat(ui): clickable document viewer — open any cited document in the browser from chat chips and the sources table
This commit is contained in:
@@ -98,10 +98,15 @@ def test_on_topic_question_streams_grounded_answer(
|
||||
|
||||
# Grounded: a kubernetes.md source chip renders under the bubble
|
||||
# (top-N docs can add more chips; the question's doc must be among them).
|
||||
# Phase 10: chips open the document viewer in a new tab (encoded URL).
|
||||
chip = page.locator(".msg.brain .source-chip", has_text="kubernetes.md")
|
||||
expect(chip).to_have_count(1)
|
||||
expect(chip.first).to_contain_text("kubernetes.md")
|
||||
expect(chip.first).to_have_attribute("href", "/sources.html")
|
||||
expect(chip.first).to_have_attribute(
|
||||
"href", "/document.html?source=docs&path=homelab%2Fkubernetes.md"
|
||||
)
|
||||
expect(chip.first).to_have_attribute("target", "_blank")
|
||||
expect(chip.first).to_have_attribute("rel", "noopener")
|
||||
|
||||
# Button recovers: enabled + "Send" (never stale).
|
||||
expect(page.locator("#send-btn")).to_be_enabled()
|
||||
|
||||
Reference in New Issue
Block a user