diff --git a/tests/gui/books/heading-nav/README.md b/tests/gui/books/heading-nav/README.md new file mode 100644 index 00000000..f74c2b1c --- /dev/null +++ b/tests/gui/books/heading-nav/README.md @@ -0,0 +1,3 @@ +# Heading nav + +This GUI test book is used for testing sidebar heading navigation. diff --git a/tests/gui/books/heading-nav/book.toml b/tests/gui/books/heading-nav/book.toml new file mode 100644 index 00000000..5ec1d181 --- /dev/null +++ b/tests/gui/books/heading-nav/book.toml @@ -0,0 +1,2 @@ +[book] +title = "heading-nav" diff --git a/tests/gui/books/heading-nav/src/SUMMARY.md b/tests/gui/books/heading-nav/src/SUMMARY.md new file mode 100644 index 00000000..a7f68ee0 --- /dev/null +++ b/tests/gui/books/heading-nav/src/SUMMARY.md @@ -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) diff --git a/tests/gui/books/test_book/src/headings/collapsed.md b/tests/gui/books/heading-nav/src/collapsed.md similarity index 100% rename from tests/gui/books/test_book/src/headings/collapsed.md rename to tests/gui/books/heading-nav/src/collapsed.md diff --git a/tests/gui/books/test_book/src/headings/current-to-bottom.md b/tests/gui/books/heading-nav/src/current-to-bottom.md similarity index 100% rename from tests/gui/books/test_book/src/headings/current-to-bottom.md rename to tests/gui/books/heading-nav/src/current-to-bottom.md diff --git a/tests/gui/books/test_book/src/headings/empty.md b/tests/gui/books/heading-nav/src/empty.md similarity index 100% rename from tests/gui/books/test_book/src/headings/empty.md rename to tests/gui/books/heading-nav/src/empty.md diff --git a/tests/gui/books/test_book/src/headings/large-intro.md b/tests/gui/books/heading-nav/src/large-intro.md similarity index 100% rename from tests/gui/books/test_book/src/headings/large-intro.md rename to tests/gui/books/heading-nav/src/large-intro.md diff --git a/tests/gui/books/test_book/src/headings/markup.md b/tests/gui/books/heading-nav/src/markup.md similarity index 100% rename from tests/gui/books/test_book/src/headings/markup.md rename to tests/gui/books/heading-nav/src/markup.md diff --git a/tests/gui/books/test_book/src/headings/normal-intro.md b/tests/gui/books/heading-nav/src/normal-intro.md similarity index 100% rename from tests/gui/books/test_book/src/headings/normal-intro.md rename to tests/gui/books/heading-nav/src/normal-intro.md diff --git a/tests/gui/books/test_book/src/SUMMARY.md b/tests/gui/books/test_book/src/SUMMARY.md index eadfd409..d81f6ecb 100644 --- a/tests/gui/books/test_book/src/SUMMARY.md +++ b/tests/gui/books/test_book/src/SUMMARY.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) --- diff --git a/tests/gui/books/test_book/src/headings/README.md b/tests/gui/books/test_book/src/headings/README.md deleted file mode 100644 index 4dd86b7e..00000000 --- a/tests/gui/books/test_book/src/headings/README.md +++ /dev/null @@ -1 +0,0 @@ -# Heading Navigation diff --git a/tests/gui/heading-nav-collapsed.goml b/tests/gui/heading-nav-collapsed.goml index 2eabf0ab..0985bfb6 100644 --- a/tests/gui/heading-nav-collapsed.goml +++ b/tests/gui/heading-nav-collapsed.goml @@ -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) diff --git a/tests/gui/heading-nav-current-to-bottom.goml b/tests/gui/heading-nav-current-to-bottom.goml index 8bc8a238..de0cbfd9 100644 --- a/tests/gui/heading-nav-current-to-bottom.goml +++ b/tests/gui/heading-nav-current-to-bottom.goml @@ -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") diff --git a/tests/gui/heading-nav-empty.goml b/tests/gui/heading-nav-empty.goml index c86df73a..340f4e68 100644 --- a/tests/gui/heading-nav-empty.goml +++ b/tests/gui/heading-nav-empty.goml @@ -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) diff --git a/tests/gui/heading-nav-large-intro.goml b/tests/gui/heading-nav-large-intro.goml index b9c78aa0..cb93c617 100644 --- a/tests/gui/heading-nav-large-intro.goml +++ b/tests/gui/heading-nav-large-intro.goml @@ -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) diff --git a/tests/gui/heading-nav-markup.goml b/tests/gui/heading-nav-markup.goml index ad4b5e20..c37d98d9 100644 --- a/tests/gui/heading-nav-markup.goml +++ b/tests/gui/heading-nav-markup.goml @@ -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) diff --git a/tests/gui/heading-nav-normal-intro.goml b/tests/gui/heading-nav-normal-intro.goml index f06d4eab..4a50c99d 100644 --- a/tests/gui/heading-nav-normal-intro.goml +++ b/tests/gui/heading-nav-normal-intro.goml @@ -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")