From eed9cdf0c091fa51da9e216edca0de6abda3a269 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Wed, 29 Apr 2015 02:37:31 +0000 Subject: [PATCH] Support usage of ICCCM compliant window in UAT --- features/support/env.rb | 4 ++++ lib/uh/wm/testing/acceptance_helpers.rb | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/features/support/env.rb b/features/support/env.rb index 3a7fcfc..b5333d3 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -28,6 +28,10 @@ Around '@other_wm_running' do |_, block| with_other_wm { block.call } end +After '@icccm_window' do + icccm_window_ensure_stop +end + if ENV.key? 'TRAVIS' ENV['UHWMTEST_TIMEOUT'] = 8.to_s end diff --git a/lib/uh/wm/testing/acceptance_helpers.rb b/lib/uh/wm/testing/acceptance_helpers.rb index bf86f5e..5bee5e6 100644 --- a/lib/uh/wm/testing/acceptance_helpers.rb +++ b/lib/uh/wm/testing/acceptance_helpers.rb @@ -8,6 +8,19 @@ module Uh QUIT_KEYBINDING = 'alt+shift+q'.freeze LOG_READY = 'Working events'.freeze + def icccm_window_start + @icccm_window = ChildProcess.build(*%w[xmessage window]) + @icccm_window.start + end + + def icccm_window_ensure_stop + @icccm_window.stop + end + + def icccm_window_name + 'xmessage' + end + def uhwm_run options = '-v' command = %w[uhwm] command << options if options