Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/test_render_conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3618,6 +3618,11 @@ def test_forced_colors_keep_current_conversation_regions_distinct(browser, serve
page.locator(".lf-threads-toggle").click()
panel_settled(page)
page.evaluate("() => document.activeElement?.blur()")
# The named address toggles the panel it names, so from a panel opened by its
# visible control the first completion closes it and the second is the arrival.
page.keyboard.press("g")
page.keyboard.press("Shift+t")
panel_settled(page, open=False)
page.keyboard.press("g")
page.keyboard.press("Shift+t")
threads = page.locator(".lf-threads")
Expand Down Expand Up @@ -3702,6 +3707,11 @@ def test_no_focus_mark_the_panel_draws_on_a_walk_down_its_list_is_cut_or_covered
# typed its keys into the box, which is exactly what the non-vacuity check at the
# end caught: thirty-two landings asserted, none of them on a thread.
page.evaluate("() => document.activeElement?.blur()")
# The named address toggles the panel it names, so from a panel opened by its
# visible control the first completion closes it and the second is the arrival.
page.keyboard.press("g")
page.keyboard.press("Shift+t")
panel_settled(page, open=False)
page.keyboard.press("g")
page.keyboard.press("Shift+t")
expect(page.locator(".lf-threads")).to_be_focused()
Expand Down Expand Up @@ -4376,6 +4386,11 @@ def test_the_room_a_run_heading_takes_follows_the_reader_drawing_the_panel(
# into it as characters. COVERED_TOP answers null for a focus outside the list,
# so every one of those landings agreed with the invariant by never being asked.
page.evaluate("() => document.activeElement?.blur()")
# The named address toggles the panel it names, so from a panel opened by its
# visible control the first completion closes it and the second is the arrival.
page.keyboard.press("g")
page.keyboard.press("Shift+t")
panel_settled(page, open=False)
page.keyboard.press("g")
page.keyboard.press("Shift+t")
expect(page.locator(".lf-threads")).to_be_focused()
Expand Down
7 changes: 6 additions & 1 deletion tests/test_render_drafts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3512,7 +3512,12 @@ def offsets():
assert threads_now == threads_was, "the panel took a key aimed at the document"

# Into the panel, standing on its list rather than in a box — `g T`'s landing,
# which travels nothing, so the baseline below is the one the control left.
# which travels nothing, so the baseline below is the one the control left. The
# address toggles the panel it names, so from the standing one the first completion
# closes it and the second is the arrival.
page.keyboard.press("g")
page.keyboard.press("Shift+t")
panel_settled(page, open=False)
page.keyboard.press("g")
page.keyboard.press("Shift+t")
expect(page.locator(".lf-threads")).to_be_focused()
Expand Down
5 changes: 5 additions & 0 deletions tests/test_render_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4449,6 +4449,11 @@ def test_a_thread_question_asks_until_answered(browser, serve):
# reaches Threads. A stray digit there neither travels nor picks; t then Enter makes
# the repeatable category walk and the thread-local landing explicit.
page.locator("#tq-one .lf-pick").first.focus()
# The address toggles the panel it names, so from the panel `a` opened the first
# completion closes it and the second is the arrival on the list.
page.keyboard.press("g")
page.keyboard.press("Shift+t")
panel_settled(page, open=False)
page.keyboard.press("g")
page.keyboard.press("Shift+t")
expect(page.locator(".lf-threads")).to_be_focused()
Expand Down
Loading