From 9b5c57bf4898188d64b9b4b633a825923db44296 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 13 Oct 2025 20:25:30 -0700 Subject: [PATCH] Add a basic book for GUI tests This is the default book with a single chapter. --- tests/gui/books/basic/book.toml | 2 ++ tests/gui/books/basic/src/SUMMARY.md | 3 +++ tests/gui/books/basic/src/chapter_1.md | 1 + tests/gui/help.goml | 2 +- tests/gui/sidebar-nojs.goml | 2 +- tests/testsuite/build/basic_build/README.md | 3 +++ 6 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/gui/books/basic/book.toml create mode 100644 tests/gui/books/basic/src/SUMMARY.md create mode 100644 tests/gui/books/basic/src/chapter_1.md create mode 100644 tests/testsuite/build/basic_build/README.md diff --git a/tests/gui/books/basic/book.toml b/tests/gui/books/basic/book.toml new file mode 100644 index 00000000..305c98d7 --- /dev/null +++ b/tests/gui/books/basic/book.toml @@ -0,0 +1,2 @@ +[book] +title = "basic" diff --git a/tests/gui/books/basic/src/SUMMARY.md b/tests/gui/books/basic/src/SUMMARY.md new file mode 100644 index 00000000..7390c828 --- /dev/null +++ b/tests/gui/books/basic/src/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +- [Chapter 1](./chapter_1.md) diff --git a/tests/gui/books/basic/src/chapter_1.md b/tests/gui/books/basic/src/chapter_1.md new file mode 100644 index 00000000..b743fda3 --- /dev/null +++ b/tests/gui/books/basic/src/chapter_1.md @@ -0,0 +1 @@ +# Chapter 1 diff --git a/tests/gui/help.goml b/tests/gui/help.goml index 99e3d6ba..d304e773 100644 --- a/tests/gui/help.goml +++ b/tests/gui/help.goml @@ -1,6 +1,6 @@ // This GUI test checks help popup. -go-to: |DOC_PATH| + "test_book/index.html" +go-to: |DOC_PATH| + "basic/index.html" assert-css: ("#mdbook-help-container", {"display": "none"}) press-key: '?' wait-for-css: ("#mdbook-help-container", {"display": "flex"}) diff --git a/tests/gui/sidebar-nojs.goml b/tests/gui/sidebar-nojs.goml index e153a550..14536e0c 100644 --- a/tests/gui/sidebar-nojs.goml +++ b/tests/gui/sidebar-nojs.goml @@ -4,7 +4,7 @@ // We disable javascript javascript: false -go-to: |DOC_PATH| + "test_book/index.html" +go-to: |DOC_PATH| + "basic/index.html" store-value: (height, 1028) set-window-size: (1028, |height|) diff --git a/tests/testsuite/build/basic_build/README.md b/tests/testsuite/build/basic_build/README.md new file mode 100644 index 00000000..2c574c3a --- /dev/null +++ b/tests/testsuite/build/basic_build/README.md @@ -0,0 +1,3 @@ +# Basic book + +This GUI test book is the default book with a single chapter.