summaryrefslogtreecommitdiff
path: root/features/highlight.feature
blob: fd72ea9a9712aa219976cfc0559f142fe29731c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Scenario: legal highlights should not persist across piece selection
  Given I start server and client
  Then I am ready to play
  When white selects "d2"
  And white selects "d2"
  And white selects "e2"
  Given I switch to buffer "*Chessboard*"
  Then the square at "d3" is unhighlighted

Scenario: preserve last-move highlight after changing my mind
  Given I start server and client
  Then I am ready to play
  When white moves "d4"
  And black moves "e5"
  And white selects "d4"
  And white selects "d4"
  Then the square at "e5" is highlighted last-move
  When black selects "e5"
  And black selects "e5"
  Then the square at "e5" is highlighted last-move

Scenario: preserve last-move highlight after pre-move invalidated
  Given I start server and client
  Then I am ready to play
  When white moves "d4"
  And black moves "e5"
  And white moves "e4"
  And white moves "d5"
  Then the square at "d5" is highlighted pre-move
  When black moves "ex"
  Given I switch to buffer "*Chessboard*"
  Then the square at "d4" is highlighted last-move

Scenario: Legal highlight locus must needs reduce after opponent moves
  Given I start server and client
  Then I am ready to play
  When white moves "d4"
  And black moves "d5"
  And black selects "e7"
  Then the square at "e5" is highlighted legal
  Then the square at "f6" is highlighted legal
  And white moves "e4"
  Given I switch to buffer "*Chessboard*<2>"
  Then the square at "e5" is highlighted legal
  Then the square at "f6" is unhighlighted

Scenario: My opponent invalidates my pre-move.  I should not need to click twice for next selection.
  Given I start server and client
  Then I am ready to play
  And white moves "d4"
  And black moves "e5"
  When black selects "e5"
  Then the square at "e5" is highlighted selected
  Then the square at "e4" is highlighted legal
  And white moves "dx"
  Given I switch to buffer "*Chessboard*<2>"
  Then the square at "e5" is highlighted last-move
  Then the square at "e4" is unhighlighted
  When black selects "c7"
  Then the square at "c7" is highlighted selected

Scenario: paint-move had contained a redraw that was 2000 microseconds (still 1/200 of blink of an eye)
  Given I start server and client
  Then I am ready to play
  When white moves "d4"
  And black moves "c5"
  And paint-move last 2 plies less than 300 microseconds (individually)