Move heading-nav gui tests to a dedicated book
This commit is contained in:
parent
e37e5314f8
commit
87e9cc0ac3
17 changed files with 19 additions and 14 deletions
3
tests/gui/books/heading-nav/README.md
Normal file
3
tests/gui/books/heading-nav/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Heading nav
|
||||
|
||||
This GUI test book is used for testing sidebar heading navigation.
|
||||
2
tests/gui/books/heading-nav/book.toml
Normal file
2
tests/gui/books/heading-nav/book.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[book]
|
||||
title = "heading-nav"
|
||||
8
tests/gui/books/heading-nav/src/SUMMARY.md
Normal file
8
tests/gui/books/heading-nav/src/SUMMARY.md
Normal 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)
|
||||
|
|
@ -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)
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
# Heading Navigation
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue