mdbook/tests/gui/move-between-pages.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Text
Raw Normal View History

2025-03-20 22:07:08 +02:00
// This tests pressing the left and right arrows moving to previous and next page.
go-to: |DOC_PATH| + "all-summary/index.html"
// default page is the first chapter
assert-text: ("title", "Prefix 1 - all-summary")
// Trying to move to the left beyond the prefix pages - nothing changes
press-key: 'ArrowLeft'
assert-text: ("title", "Prefix 1 - all-summary")
// Move left
go-to: |DOC_PATH| + "all-summary/intro.html"
assert-text: ("title", "Introduction - all-summary")
press-key: 'ArrowLeft'
assert-text: ("title", "Prefix 2 - all-summary")
press-key: 'ArrowLeft'
assert-text: ("title", "Prefix 1 - all-summary")
// Move right
press-key: 'ArrowRight'
assert-text: ("title", "Prefix 2 - all-summary")
press-key: 'ArrowRight'
assert-text: ("title", "Introduction - all-summary")
press-key: 'ArrowRight'
assert-text: ("title", "P1 C1 - all-summary")
press-key: 'ArrowRight'
assert-text: ("title", "P2 C1 - all-summary")
press-key: 'ArrowRight'
assert-text: ("title", "Suffix 1 - all-summary")
2025-03-20 22:07:08 +02:00
press-key: 'ArrowRight'
assert-text: ("title", "Suffix 2 - all-summary")
2025-03-20 22:07:08 +02:00
// Try to go beyond the last page
press-key: 'ArrowRight'
assert-text: ("title", "Suffix 2 - all-summary")