show sync button for admin
This commit is contained in:
@@ -328,8 +328,9 @@ def test_completed_turn_unaffected(
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 4. The DELIBERATE clear is untouched: New Chat from the sources page
|
||||
# still clears the conversation (phase 14/19 contract)
|
||||
# 4. The DELIBERATE clear is untouched: New chat (chat-page only since
|
||||
# the owner rework 2026-08-28) still clears the conversation
|
||||
# (phase 14 contract)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -341,18 +342,15 @@ def test_new_chat_still_clears_conversation(
|
||||
_ask(page, QUESTION)
|
||||
assert _stored(page) is not None
|
||||
|
||||
# To the sources page (anonymous is fine — the shared bar carries the
|
||||
# New Chat control regardless of auth, phase 19).
|
||||
page.goto(app_url + "/sources.html")
|
||||
# The New chat button is chat-page only (it left the shared bar at
|
||||
# owner request, 2026-08-28) — the deliberate clear runs right here.
|
||||
new_chat = page.locator("#new-chat-btn")
|
||||
expect(new_chat).to_be_visible()
|
||||
new_chat.click()
|
||||
|
||||
# "New chat" on a non-chat page means "go to the chat, fresh": the
|
||||
# land page shows the empty state and the conversation key is GONE —
|
||||
# the deliberate clearChatStorage() is unaffected by the phase-20
|
||||
# pagehide save point.
|
||||
expect(page).to_have_url(app_url + "/")
|
||||
# The chat lands on its empty state and the conversation key is
|
||||
# GONE — the deliberate clear is unaffected by the phase-20 pagehide
|
||||
# save point.
|
||||
expect(page.locator("#empty-state")).to_be_visible()
|
||||
expect(page.locator(".msg")).to_have_count(0)
|
||||
assert _stored(page) is None, "New Chat must clear the localStorage key"
|
||||
|
||||
Reference in New Issue
Block a user