| 1 |
go-to: |DOC_PATH| + "redirect/inner/old.html" |
| 2 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"}) |
| 3 |
|
| 4 |
// Check that it preserves fragments when redirecting. |
| 5 |
go-to: |DOC_PATH| + "redirect/inner/old.html#fragment" |
| 6 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#fragment"}) |
| 7 |
|
| 8 |
// The fragment one here isn't necessary, but should still work. |
| 9 |
go-to: |DOC_PATH| + "redirect/pointless-fragment.html" |
| 10 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"}) |
| 11 |
go-to: |DOC_PATH| + "redirect/pointless-fragment.html#foo" |
| 12 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#foo"}) |
| 13 |
|
| 14 |
// Page rename, and a fragment rename. |
| 15 |
go-to: |DOC_PATH| + "redirect/rename-page-and-fragment.html" |
| 16 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"}) |
| 17 |
go-to: |DOC_PATH| + "redirect/rename-page-and-fragment.html#orig" |
| 18 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#new"}) |
| 19 |
|
| 20 |
// Page rename, and the fragment goes to a *different* page from the default. |
| 21 |
go-to: |DOC_PATH| + "redirect/rename-page-fragment-elsewhere.html" |
| 22 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"}) |
| 23 |
go-to: |DOC_PATH| + "redirect/rename-page-fragment-elsewhere.html#orig" |
| 24 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/other-chapter.html#new"}) |
| 25 |
|
| 26 |
// Rename fragment on an existing page. |
| 27 |
go-to: |DOC_PATH| + "redirect/new-chapter.html#orig" |
| 28 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#new"}) |
| 29 |
|
| 30 |
// Other fragments aren't affected. |
| 31 |
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load. |
| 32 |
go-to: |DOC_PATH| + "redirect/new-chapter.html" |
| 33 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"}) |
| 34 |
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load. |
| 35 |
go-to: |DOC_PATH| + "redirect/new-chapter.html#dont-change" |
| 36 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#dont-change"}) |
| 37 |
|
| 38 |
// Rename fragment on an existing page to another page. |
| 39 |
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load. |
| 40 |
go-to: |DOC_PATH| + "redirect/new-chapter.html#orig-new-chapter" |
| 41 |
assert-window-property: ({"location": |DOC_PATH| + "redirect/other-chapter.html#new"}) |