From e8dacfa4ac3e3452dce3458a3600957fe7da41e5 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Tue, 21 Apr 2015 08:20:37 +0000 Subject: [PATCH] Fix non-deterministic test in layout/unmanage --- features/layout/unmanage.feature | 4 ++-- features/steps/x_steps.rb | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/features/layout/unmanage.feature b/features/layout/unmanage.feature index dcb950e..9baf703 100644 --- a/features/layout/unmanage.feature +++ b/features/layout/unmanage.feature @@ -2,8 +2,8 @@ Feature: layout client unmanagement Background: Given uhwm is running - And a first window is mapped - And a second window is mapped + And a first window is managed + And a second window is managed Scenario: maps another window When the second window is unmapped diff --git a/features/steps/x_steps.rb b/features/steps/x_steps.rb index 029b83f..be0faf8 100644 --- a/features/steps/x_steps.rb +++ b/features/steps/x_steps.rb @@ -1,10 +1,7 @@ -Given /^a (\w+) window is mapped$/ do |ident| +Given /^a(?:\s(\w+))? window is managed$/ do |ident| + ident ||= :default x_client(ident).map.sync -end - -Given /^a window is managed$/ do - x_client.map.sync - uhwm_wait_output /manag.+#{x_client.name}/i + uhwm_wait_output /manag.+#{x_client(ident).name}/i end When /^I press the ([^ ]+) keys?$/ do |keys|