fix: restore prominent realtime Talk navigation
This commit is contained in:
1 parent
3752741e19
commit
7cb641b35a
4 files changed
+31
-2
No files matched your search
@@ -226,3 +226,27 @@ def test_immediate_pin_after_response_uses_final_server_revision():
|
||||
patch = next(body for method,path,body in calls if method == 'PATCH')
|
||||
assert patch['revision'] == 2
|
||||
browser.close()
|
||||
|
||||
|
||||
def test_realtime_voice_is_prominent_on_desktop_and_mobile():
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
for width in [1280,390]:
|
||||
page = browser.new_page(viewport={'width':width,'height':900})
|
||||
calls, streams, conversations, messages = fixture(page)
|
||||
page.goto('https://hope.test/'); page.wait_for_load_state('networkidle')
|
||||
expect(page.get_by_role('button',name='Talk to Hope',exact=True)).to_be_visible()
|
||||
page.locator('#primaryInput').fill('Keep this draft while I talk')
|
||||
page.locator('#talkToHope').click()
|
||||
expect(page.locator('#legacyVoice')).to_be_visible()
|
||||
expect(page.locator('#startBtn')).to_be_visible()
|
||||
expect(page.locator('#voiceModeBtn')).to_have_attribute('aria-pressed','true')
|
||||
expect(page.locator('#backToChat')).to_be_visible()
|
||||
page.locator('#backToChat').click()
|
||||
expect(page.locator('#primaryInput')).to_have_value('Keep this draft while I talk')
|
||||
expect(page.locator('#talkToHope')).to_be_visible()
|
||||
assert not any(path == '/token' for method,path,body in calls)
|
||||
assert page.evaluate('document.documentElement.scrollWidth <= innerWidth')
|
||||
page.screenshot(path=f'/tmp/hope-talk-visible-{width}.png')
|
||||
page.close()
|
||||
browser.close()
|
||||
Reference in new issue
Block a user