Increase layout protocol test coverage (#remove)

This commit is contained in:
Thibault Jouan 2015-04-21 08:02:05 +00:00
parent 4e2ec5f6ec
commit 7ee70b666b
2 changed files with 18 additions and 2 deletions

View File

@ -9,7 +9,12 @@ Feature: layout protocol
end
def << client
puts "testing_#{client.name}"
puts "testing_#<<_#{client.name}"
client.show
end
def remove client
puts "testing_#remove_#{client.name}"
end
end
"""
@ -21,4 +26,10 @@ Feature: layout protocol
Scenario: tells the layout to manage a client with #<< message
Given uhwm is running with options -v -r./layout -l Layout
When a window requests to be mapped
Then the output must contain "testing_XClient/default"
Then the output must contain "testing_#<<_XClient/default"
Scenario: tells the layout to unmanage a client with #remove message
Given uhwm is running with options -v -r./layout -l Layout
And a window is managed
When the window is unmapped
Then the output must contain "testing_#remove_XClient/default"

View File

@ -23,6 +23,11 @@ When /^the window requests to be unmapped$/ do
x_client.unmap.sync
end
When /^the window is unmapped$/ do
x_client.unmap.sync
uhwm_wait_output /unmanag.+#{x_client.name}/i
end
When /^the (\w+) window is unmapped$/ do |ident|
x_client(ident).unmap.sync
uhwm_wait_output /unmanag.+#{x_client(ident).name}/i