summaryrefslogtreecommitdiff
path: root/features/premove.feature
diff options
context:
space:
mode:
authordickmao <dick.r.chiang@gmail.com>2018-08-27 17:00:35 -0400
committerdickmao <dick.r.chiang@gmail.com>2018-09-06 09:24:10 -0400
commit3222b53d942daa404852e5148ba9d3ebb8fe96d0 (patch)
tree37e2af6242423e57adbbc1238433f58c92ac9bd0 /features/premove.feature
parent67339d896aa65d75272b80134a8128276c8c6a0f (diff)
Pre-moves
To activate, look for Chess Display Allow Pre Moves in: M-x customize-group chess-display Tested via: make test make test24 (requires evim)
Diffstat (limited to 'features/premove.feature')
-rw-r--r--features/premove.feature34
1 files changed, 34 insertions, 0 deletions
diff --git a/features/premove.feature b/features/premove.feature
new file mode 100644
index 0000000..47cf85f
--- /dev/null
+++ b/features/premove.feature
@@ -0,0 +1,34 @@
+Scenario: en-passant logic assumed no pre-moves (white)
+ Given I start server and client
+ Then I am ready to play
+ When white moves "d4"
+ And white selects "d4"
+ Then the square at "d3" is unhighlighted
+
+Scenario: en-passant logic assumed no pre-moves (black)
+ Given I start server and client
+ Then I am ready to play
+ When white moves "d4"
+ And black moves "e5"
+ And black selects "e5"
+ Then the square at "e6" is unhighlighted
+
+Scenario: pre-move can leave king in check, assuming checking piece is captured
+ Given I start server and client
+ Then I am ready to play
+ And I set position of "*chess-network*<1>" to fen "3rk3/8/8/3R4/8/8/PPPPPPPP/1NBQKBNR w - -"
+ And I send position from "*chess-network*<1>"
+ When black selects "e8"
+ And black selects "d8"
+ Then the square at "d8" is highlighted pre-move
+
+
+Scenario: pre-move promotion should not ask yet
+ Given I start server and client
+ Then I am ready to play
+ And I set position of "*chess-network*<1>" to fen "rnbqkbn1/pppppppP/8/8/8/8/PPPPPPP1/RNBQKBNR w - -"
+ And I send position from "*chess-network*<1>"
+ And white moves "d4"
+ And white selects "h7"
+ And white selects "h8"
+ Then the square at "h8" is highlighted pre-move