Debian Codegraph @

tests/gui/move-between-pages.goml

raw
1 // This tests pressing the left and right arrows moving to previous and next page.
2
3 go-to: |DOC_PATH| + "all-summary/index.html"
4
5 // default page is the first chapter
6 wait-for-text: ("title", "Prefix 1 - all-summary")
7
8 // Trying to move to the left beyond the prefix pages - nothing changes
9 press-key: 'ArrowLeft'
10 wait-for-text: ("title", "Prefix 1 - all-summary")
11
12 // Move left
13 go-to: |DOC_PATH| + "all-summary/intro.html"
14 wait-for-text: ("title", "Introduction - all-summary")
15
16 press-key: 'ArrowLeft'
17 wait-for-text: ("title", "Prefix 2 - all-summary")
18
19 press-key: 'ArrowLeft'
20 wait-for-text: ("title", "Prefix 1 - all-summary")
21
22 // Move right
23 press-key: 'ArrowRight'
24 wait-for-text: ("title", "Prefix 2 - all-summary")
25
26 press-key: 'ArrowRight'
27 wait-for-text: ("title", "Introduction - all-summary")
28
29 press-key: 'ArrowRight'
30 wait-for-text: ("title", "P1 C1 - all-summary")
31
32 press-key: 'ArrowRight'
33 wait-for-text: ("title", "P2 C1 - all-summary")
34
35 press-key: 'ArrowRight'
36 wait-for-text: ("title", "Suffix 1 - all-summary")
37
38 press-key: 'ArrowRight'
39 wait-for-text: ("title", "Suffix 2 - all-summary")
40
41 // Try to go beyond the last page
42 press-key: 'ArrowRight'
43 wait-for-text: ("title", "Suffix 2 - all-summary")