// 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
wait-for-text: ("title", "Prefix 1 - all-summary")

// Trying to move to the left beyond the prefix pages - nothing changes
press-key: 'ArrowLeft'
wait-for-text: ("title", "Prefix 1 - all-summary")

// Move left
go-to: |DOC_PATH| + "all-summary/intro.html"
wait-for-text: ("title", "Introduction - all-summary")

press-key: 'ArrowLeft'
wait-for-text: ("title", "Prefix 2 - all-summary")

press-key: 'ArrowLeft'
wait-for-text: ("title", "Prefix 1 - all-summary")

// Move right
press-key: 'ArrowRight'
wait-for-text: ("title", "Prefix 2 - all-summary")

press-key: 'ArrowRight'
wait-for-text: ("title", "Introduction - all-summary")

press-key: 'ArrowRight'
wait-for-text: ("title", "P1 C1 - all-summary")

press-key: 'ArrowRight'
wait-for-text: ("title", "P2 C1 - all-summary")

press-key: 'ArrowRight'
wait-for-text: ("title", "Suffix 1 - all-summary")

press-key: 'ArrowRight'
wait-for-text: ("title", "Suffix 2 - all-summary")

// Try to go beyond the last page
press-key: 'ArrowRight'
wait-for-text: ("title", "Suffix 2 - all-summary")
