Test manager client unmanagement with cucumber

This commit is contained in:
Thibault Jouan 2015-04-21 01:50:45 +00:00
parent a15af6f0ab
commit 42751993a2
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,7 @@
Feature: manager client unmanagement
Scenario: logs when a new client is unmanaged
Given uhwm is running
And a window is mapped
When the window requests to be unmapped
Then the output must match /unmanag.+xclient/i

View File

@ -1,3 +1,7 @@
Given /^a window is mapped$/ do
x_window_map
end
Given /^a (\w+) window is mapped$/ do |ident|
x_window_map ident: ident
end
@ -10,6 +14,10 @@ When /^a window requests to be mapped$/ do
x_window_map
end
When /^the window requests to be unmapped$/ do
x_window_unmap
end
When /^the (\w+) window requests to be unmapped$/ do |ident|
x_window_unmap ident: ident
end

View File

@ -99,7 +99,7 @@ module Uh
`xwininfo -id #{x_window_id options}`[/Map State: (\w+)/, 1]
end
def x_window_unmap options
def x_window_unmap **options
x_client(options).unmap
x_client(options).sync
end