Test how the manager handles window changes

This commit is contained in:
Thibault Jouan 2015-04-22 08:08:21 +00:00
parent 95245e1178
commit accbebe97c
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
Feature: clients window properties updating
Scenario: logs when the window properties of a client change
Given uhwm is running
And a window is mapped
When the window name changes to "testing_new_name"
Then the output must match /updat.+testing_new_name/i

View File

@ -28,6 +28,10 @@ When /^the window is destroyed$/ do
x_client.destroy.sync
end
When /^the window name changes to "([^"]+)"$/ do |name|
x_client.window_name = name
end
Then /^it must connect to X display$/ do
uhwm_wait_ready
expect(x_socket_check uhwm.pid).to be true

View File

@ -159,6 +159,11 @@ module Uh
@name
end
def window_name= name
@name = @window.name = name
window.name
end
def map times: 1
times.times { window.map }
window.map