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