uh-wm/features/steps/x_steps.rb
Thibault Jouan ceac19b346 Quit on `mod1+q' key binding
* Loop our runner until it is "stopped";
* Use the event dispatcher to stop the runner on `mod1+q' key press;
* Tell the manager to grab the `q' key.
2015-04-09 00:30:13 +00:00

14 lines
329 B
Ruby

def x_key key
fail "cannot simulate X key `#{key}'" unless system "xdotool key #{key}"
end
When /^I press the default quit key binding$/ do
x_key 'alt+q'
end
Then /^it must connect to X display$/ do
uhwm_wait_output 'Connected to'
expect(`sockstat -u`.lines.grep /\s+ruby.+\s+#{@process.pid}/)
.not_to be_empty
end