2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/format/config.html"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Check that it preserves fragments when redirecting.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/format/config.html#fragment"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html#fragment"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// The fragment one here isn't necessary, but should still work.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/pointless-fragment.html"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html"})
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/pointless-fragment.html#foo"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html#foo"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Page rename, and a fragment rename.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/rename-page-and-fragment.html"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html"})
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/rename-page-and-fragment.html#orig"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html#new"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Page rename, and the fragment goes to a *different* page from the default.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/rename-page-fragment-elsewhere.html"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html"})
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/rename-page-fragment-elsewhere.html#orig"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/suffix.html#new"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Rename fragment on an existing page.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/prefix.html#orig"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html#new"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Other fragments aren't affected.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/index.html" // Reset page since redirects are processed on load.
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/prefix.html"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html"})
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/index.html" // Reset page since redirects are processed on load.
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/prefix.html#dont-change"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/prefix.html#dont-change"})
|
2025-07-08 15:37:46 -07:00
|
|
|
|
|
|
|
|
// Rename fragment on an existing page to another page.
|
2025-10-13 20:07:38 -07:00
|
|
|
go-to: |DOC_PATH| + "test_book/index.html" // Reset page since redirects are processed on load.
|
|
|
|
|
go-to: |DOC_PATH| + "test_book/prefix.html#orig-new-page"
|
|
|
|
|
assert-window-property: ({"location": |DOC_PATH| + "test_book/suffix.html#new"})
|