diff --git a/features/session/connection.feature b/features/session/connection.feature deleted file mode 100644 index 87c6eef..0000000 --- a/features/session/connection.feature +++ /dev/null @@ -1,5 +0,0 @@ -Feature: connection to X server - - Scenario: connects to X server - When I start uhwm - Then it must connect to X display diff --git a/features/steps/x_steps.rb b/features/steps/x_steps.rb index fff2472..d145146 100644 --- a/features/steps/x_steps.rb +++ b/features/steps/x_steps.rb @@ -36,11 +36,6 @@ 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 -end - Then /^the(?:\s(\w+))? window must be mapped$/ do |ident| timeout_until 'window not mapped after %d seconds' do x_window_map_state(x_client(ident).window_id) == 'IsViewable' diff --git a/lib/uh/wm/testing/acceptance_helpers.rb b/lib/uh/wm/testing/acceptance_helpers.rb index c85f07d..4ef50f7 100644 --- a/lib/uh/wm/testing/acceptance_helpers.rb +++ b/lib/uh/wm/testing/acceptance_helpers.rb @@ -89,15 +89,6 @@ expected `#{message}' (#{times}) not seen after #{e.timeout} seconds in: fail "cannot simulate X key `#{k}'" unless system "xdotool key #{k}" end - def x_socket_check pid - case RbConfig::CONFIG['host_os'] - when /linux/ - `netstat -xp 2> /dev/null`.lines.grep /\s+#{pid}\/ruby/ - else - `sockstat -u`.lines.grep /\s+ruby.+\s+#{pid}/ - end.any? - end - def x_window_map_state window_id `xwininfo -id #{window_id}`[/Map State: (\w+)/, 1] end