Improve UAT on layout

* Move cucumber features regarding the layout protocol in
  layout/protocol;
* Add new cucumber features to test uh-layout integration in uh-wm, at
  least simple mapping and focus behavior;
* Add new acceptance testing helpers
This commit is contained in:
Thibault Jouan
2015-04-18 19:33:47 +00:00
parent 2894783b57
commit 82a4161cc2
5 changed files with 56 additions and 25 deletions

View File

@@ -1,16 +1,12 @@
Feature: layout client management
Scenario: sends the #<< message when telling the layout to manage a client
Given a file named layout.rb with:
"""
class Layout
def register *_; end
Background:
Given uhwm is running
def << client
puts client
end
end
"""
And uhwm is running with options -v -r./layout -l Layout
Scenario: maps new client window
When a window requests to be mapped
Then the output must contain the window name
Then the window must be mapped
Scenario: focuses new client window
When a window requests to be mapped
Then the window must be focused

View File

@@ -0,0 +1,24 @@
Feature: layout protocol
Background:
Given a file named layout.rb with:
"""
class Layout
def register display
puts display
end
def << client
puts client
end
end
"""
Scenario: tells the layout to register with #register message
When I run uhwm with option -r./layout -l Layout
Then the output must contain current display
Scenario: tells the layout to manage a client with #<< message
Given uhwm is running with options -v -r./layout -l Layout
When a window requests to be mapped
Then the output must contain the window name

View File

@@ -1,13 +0,0 @@
Feature: layout registration
Scenario: sends the #register message to the layout with the display
Given a file named layout.rb with:
"""
class Layout
def register display
puts display
end
end
"""
When I run uhwm with option -r./layout -l Layout
Then the output must contain current display