Move heading-nav gui tests to a dedicated book

This commit is contained in:
Eric Huss 2025-10-13 20:11:59 -07:00
parent e37e5314f8
commit 87e9cc0ac3
17 changed files with 19 additions and 14 deletions

View file

@ -0,0 +1,3 @@
# Heading nav
This GUI test book is used for testing sidebar heading navigation.

View file

@ -0,0 +1,2 @@
[book]
title = "heading-nav"

View file

@ -0,0 +1,8 @@
# Summary
- [Empty page](empty.md)
- [Large text before first heading](large-intro.md)
- [Normal text before first heading](normal-intro.md)
- [Collapsed headings](collapsed.md)
- [Headings with markup](markup.md)
- [Current scrolls to bottom](current-to-bottom.md)

View file

@ -28,13 +28,6 @@
- [Syntax Highlight](languages/highlight.md)
- [Rust Specific](rust/README.md)
- [Rust Codeblocks](rust/rust_codeblock.md)
- [Heading Navigation](headings/README.md)
- [Empty page](headings/empty.md)
- [Large text before first heading](headings/large-intro.md)
- [Normal text before first heading](headings/normal-intro.md)
- [Collapsed headings](headings/collapsed.md)
- [Headings with markup](headings/markup.md)
- [Current scrolls to bottom](headings/current-to-bottom.md)
- [Last numbered chapter](last.md)
---

View file

@ -1 +0,0 @@
# Heading Navigation

View file

@ -1,7 +1,7 @@
// Tests for collapsed heading sidebar navigation.
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/collapsed.html"
go-to: |DOC_PATH| + "heading-nav/collapsed.html"
assert-count: (".header-item", 12)
assert-count: (".current-header", 1)

View file

@ -2,7 +2,7 @@
// bottom.
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/current-to-bottom.html"
go-to: |DOC_PATH| + "heading-nav/current-to-bottom.html"
assert-count: (".current-header", 1)
assert-text: (".current-header", "First header")

View file

@ -1,6 +1,6 @@
// When there aren't any headings, there shouldn't be any header items in the sidebar.
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/empty.html"
go-to: |DOC_PATH| + "heading-nav/empty.html"
assert-count: (".header-item", 0)
assert-count: (".current-header", 0)

View file

@ -2,7 +2,7 @@
// you scroll down and make it visible on screen.
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/large-intro.html"
go-to: |DOC_PATH| + "heading-nav/large-intro.html"
assert-count: (".header-item", 2)
assert-count: (".current-header", 0)

View file

@ -1,7 +1,7 @@
// When a header has various markup, the sidebar should replicate it.
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/markup.html"
go-to: |DOC_PATH| + "heading-nav/markup.html"
assert-count: (".header-item", 5)
assert-count: (".current-header", 1)

View file

@ -2,7 +2,7 @@
// should be "current".
set-window-size: (1400, 800)
go-to: |DOC_PATH| + "test_book/headings/normal-intro.html"
go-to: |DOC_PATH| + "heading-nav/normal-intro.html"
assert-count: (".header-item", 4)
assert-count: (".current-header", 1)
assert-text: (".current-header", "The first heading")