Refactor cucumber steps (quitting uhwm)
This commit is contained in:
parent
0b7c3e9128
commit
a4b6127ec8
@ -24,11 +24,11 @@ When /^I run uhwm with options? (-.+)$/ do |options|
|
||||
end
|
||||
|
||||
When /^I tell uhwm to quit$/ do
|
||||
x_key 'alt+shift+q'
|
||||
uhwm_request_quit
|
||||
end
|
||||
|
||||
When /^I quit uhwm$/ do
|
||||
x_key 'alt+shift+q'
|
||||
uhwm_request_quit
|
||||
assert_exit_status 0
|
||||
end
|
||||
|
||||
|
@ -5,6 +5,7 @@ module Uh
|
||||
module Testing
|
||||
module AcceptanceHelpers
|
||||
TIMEOUT_DEFAULT = 2
|
||||
QUIT_KEYBINDING = 'alt+shift+q'.freeze
|
||||
|
||||
def uhwm_run options = '-v'
|
||||
command = %w[uhwm]
|
||||
@ -12,6 +13,10 @@ module Uh
|
||||
@interactive = @process = run command.join ' '
|
||||
end
|
||||
|
||||
def uhwm_request_quit
|
||||
x_key QUIT_KEYBINDING
|
||||
end
|
||||
|
||||
def uhwm_ensure_stop
|
||||
if @process
|
||||
x_key 'alt+shift+q'
|
||||
|
Loading…
x
Reference in New Issue
Block a user