From a6edac962b7c1d09373d390c886bb09337a53555 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Mon, 20 Apr 2015 09:26:49 +0000 Subject: [PATCH] Add layout client unmanagement feature --- features/layout/unmanage.feature | 10 ++++++++++ features/steps/x_steps.rb | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 features/layout/unmanage.feature diff --git a/features/layout/unmanage.feature b/features/layout/unmanage.feature new file mode 100644 index 0000000..313853c --- /dev/null +++ b/features/layout/unmanage.feature @@ -0,0 +1,10 @@ +Feature: layout client unmanagement + + Background: + Given uhwm is running + And a first window is mapped + And a second window is mapped + + Scenario: maps another window + When the second window requests to be unmapped + Then the first window must be mapped diff --git a/features/steps/x_steps.rb b/features/steps/x_steps.rb index 32465bd..d06e819 100644 --- a/features/steps/x_steps.rb +++ b/features/steps/x_steps.rb @@ -1,3 +1,7 @@ +Given /^a (\w+) window is mapped$/ do |ident| + x_window_map ident: ident +end + When /^I press the ([^ ]+) keys?$/ do |keys| x_key keys end @@ -6,6 +10,10 @@ When /^a window requests to be mapped$/ do x_window_map end +When /^the (\w+) window requests to be unmapped$/ do |ident| + x_window_unmap ident: ident +end + When /^a window requests to be mapped (\d+) times$/ do |times| x_window_map times: times.to_i end @@ -19,6 +27,10 @@ Then /^the window must be mapped$/ do expect(x_window_map_state).to eq 'IsViewable' end +Then /^the (\w+) window must be mapped$/ do |ident| + expect(x_window_map_state ident: ident).to eq 'IsViewable' +end + Then /^the window must be focused$/ do expect(x_focused_window_id).to eq x_window_id end