fix: drag-resize working now

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 06:55:18 +02:00
parent 82ba43c7ba
commit 3556ab45b3
7 changed files with 257 additions and 1 deletions

View File

@@ -71,6 +71,34 @@ defmodule BDS.Desktop.AutomationTest do
assert File.exists?(screenshot_path)
end
@tag timeout: 120_000
test "automation drags sidebar resize handle and restores width after reload" do
{:ok, session} = Automation.start_session()
on_exit(fn ->
Automation.stop_session(session)
end)
snapshot = Automation.snapshot(session)
assert snapshot.sidebar_width >= 279
assert snapshot.sidebar_width <= 281
assert :ok = Automation.drag(session, "[data-resize='sidebar']", 90)
snapshot = Automation.snapshot(session)
assert snapshot.sidebar_width >= 360
assert snapshot.sidebar_width <= 380
resized_width = snapshot.sidebar_width
assert :ok = Automation.reload(session)
snapshot = Automation.snapshot(session)
assert snapshot.sidebar_visible == true
assert snapshot.sidebar_width >= resized_width - 2
assert snapshot.sidebar_width <= resized_width + 2
end
@tag timeout: 120_000
test "automation stop_session shuts down the app and browser child processes it started" do
baseline = automation_process_counts()