Improve UAT on layout
* Move cucumber features regarding the layout protocol in layout/protocol; * Add new cucumber features to test uh-layout integration in uh-wm, at least simple mapping and focus behavior; * Add new acceptance testing helpers
This commit is contained in:
@@ -60,6 +60,10 @@ module Uh
|
||||
@x_client ||= XClient.new
|
||||
end
|
||||
|
||||
def x_focused_window_id
|
||||
Integer(`xdpyinfo`[/^focus:\s+window\s+(0x\h+)/, 1])
|
||||
end
|
||||
|
||||
def x_key key
|
||||
fail "cannot simulate X key `#{key}'" unless system "xdotool key #{key}"
|
||||
end
|
||||
@@ -73,6 +77,10 @@ module Uh
|
||||
end.any?
|
||||
end
|
||||
|
||||
def x_window_id
|
||||
@x_client.window_id
|
||||
end
|
||||
|
||||
def x_window_name
|
||||
@x_client.window_name
|
||||
end
|
||||
@@ -81,6 +89,10 @@ module Uh
|
||||
x_client.map.sync
|
||||
end
|
||||
|
||||
def x_window_map_state
|
||||
`xwininfo -id #{x_window_id}`[/Map State: (\w+)/, 1]
|
||||
end
|
||||
|
||||
def x_clients_ensure_stop
|
||||
@x_client and @x_client.terminate
|
||||
end
|
||||
@@ -135,6 +147,10 @@ module Uh
|
||||
end
|
||||
end
|
||||
|
||||
def window_id
|
||||
@window.id
|
||||
end
|
||||
|
||||
def window_name
|
||||
@name
|
||||
end
|
||||
|
Reference in New Issue
Block a user