Skip to content

Commit 85afbe4

Browse files
committed
Add GUI test to check the left and right arrow keys
1 parent 3a8faba commit 85afbe4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/gui/move-between-pages.goml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This tests basic search behavior.
2+
3+
// We disable the requests checks because `searchindex.json` will always fail
4+
// locally (due to CORS), but the searchindex.js will succeed.
5+
fail-on-request-error: false
6+
7+
go-to: |DOC_PATH| + "index.html"
8+
9+
// default page is the first numbered page
10+
assert-text: ("title", "Introduction - mdBook test book")
11+
12+
// Moving left we get to the prefix page
13+
press-key: 'ArrowLeft'
14+
assert-text: ("title", "Prefix Chapter - mdBook test book")
15+
16+
// Trying to move to the left beyond the prefix pages - nothing changes
17+
press-key: 'ArrowLeft'
18+
assert-text: ("title", "Prefix Chapter - mdBook test book")
19+
20+
// Back to the main page
21+
press-key: 'ArrowRight'
22+
assert-text: ("title", "Introduction - mdBook test book")
23+
24+
press-key: 'ArrowRight'
25+
assert-text: ("title", "Markdown Individual tags - mdBook test book")
26+
27+
press-key: 'ArrowRight'
28+
assert-text: ("title", "Heading - mdBook test book")
29+

0 commit comments

Comments
 (0)