uh-wm/features/steps/x_steps.rb
2015-04-20 10:24:39 +00:00

41 lines
936 B
Ruby

Given /^a (\w+) window is mapped$/ do |ident|
x_window_map ident: ident
end
When /^I press the ([^ ]+) keys?$/ do |keys|
x_key keys
end
When /^a window requests to be mapped$/ do
x_window_map
end
When /^the (\w+) window requests to be unmapped$/ do |ident|
x_window_unmap ident: ident
end
When /^a window requests to be mapped (\d+) times$/ do |times|
x_window_map times: times.to_i
end
Then /^it must connect to X display$/ do
uhwm_wait_output 'Connected to'
expect(x_socket_check uhwm_pid).to be true
end
Then /^the window must be mapped$/ do
expect(x_window_map_state).to eq 'IsViewable'
end
Then /^the (\w+) window must be mapped$/ do |ident|
expect(x_window_map_state ident: ident).to eq 'IsViewable'
end
Then /^the window must be focused$/ do
expect(x_focused_window_id).to eq x_window_id
end
Then /^the input event mask must include (.+)$/ do |mask|
expect(x_input_event_masks).to include mask
end