mdbook/tests/gui/move-between-pages.goml
Eric Huss 4a06e067c5 Add a general-purpose summary GUI book
This adds the all-summary GUI test book which can be used for general
purpose tests that need a few pages to exercise all the different kinds
of items.
2025-10-15 07:00:35 -07:00

43 lines
1.2 KiB
Text

// 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")
press-key: 'ArrowRight'
assert-text: ("title", "Suffix 2 - all-summary")
// Try to go beyond the last page
press-key: 'ArrowRight'
assert-text: ("title", "Suffix 2 - all-summary")