fix: recordings keep only what was played, newest waiting request kept, video pages opened play
- Playback tells the worker how much of each request was played (tts_played); the worker keeps a spoken answer's recording only that far (an answer stopped mid-way no longer keeps its unheard rest, and is marked stopped); nothing played or never reported: no file. - Old recording day folders are also removed with the first recording of each new day. - response.interrupt off, latest: a request whose final comes after a newer one's is replaced instead of replacing it. - botBrowser presses play on a page's paused main player also after open, not only after a click. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -378,14 +378,17 @@ def test_the_page_says_whether_its_sound_plays_and_opening_waits_for_it_to_start
|
||||
assert s.open(site + "/second").get("media") == []
|
||||
|
||||
|
||||
def test_clicking_through_to_a_video_page_whose_player_stays_paused_presses_play(chrome):
|
||||
def test_a_video_page_whose_player_stays_paused_gets_play_pressed_when_clicked_to_or_opened(chrome):
|
||||
cdp, site, _ = chrome
|
||||
s = BrowserSession(cdp, time.monotonic() + 15)
|
||||
s.open(site + "/results")
|
||||
page = s.click("The song")
|
||||
assert page["url"].endswith("/watch") and [m["playing"] for m in page["media"]] == [True], page
|
||||
# Opening the page by its address is not a click on it: the player is left as the page has it.
|
||||
page = s.open(site + "/watch")
|
||||
s.open(site + "/results")
|
||||
page = s.open(site + "/watch") # straight to the video page by its address
|
||||
assert [m["playing"] for m in page["media"]] == [True], page
|
||||
# Sound that is not the page's main player (an audio element, no big video) is left as it is.
|
||||
page = s.open(site + "/button")
|
||||
assert [m["playing"] for m in page["media"]] == [False]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user