diff options
| author | John Wiegley <johnw@newartisans.com> | 2018-09-06 11:11:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-06 11:11:55 -0700 |
| commit | 5298bf5d110073e9508f6357ae28eee46ad29406 (patch) | |
| tree | 37e2af6242423e57adbbc1238433f58c92ac9bd0 /features/premove.feature | |
| parent | 67339d896aa65d75272b80134a8128276c8c6a0f (diff) | |
| parent | 3222b53d942daa404852e5148ba9d3ebb8fe96d0 (diff) | |
Merge pull request #27 from dickmao/premoves
Pre-moves
Diffstat (limited to 'features/premove.feature')
| -rw-r--r-- | features/premove.feature | 34 |
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 |
