Skip to content

Commit ea55d25

Browse files
Add regression test for #112676
1 parent f431639 commit ea55d25

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/rustdoc-gui/setting-go-to-only-result.goml

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
3434
// We enter it into the search.
3535
write: (".search-input", "HasALongTraitWithParams")
3636
wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"}
37-
assert-document-property: ({"URL": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
37+
assert-window-property: ({"location": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
38+
39+
// Regression test for <https://github.com/rust-lang/rust/issues/112676>.
40+
// If "go-to-only-result" is enabled and you go back to history, it should not lead you back to the
41+
// page result again automatically.
42+
history-go-back:
43+
wait-for-document-property: {"title": "lib2 - Rust"}
44+
assert-window-property: ({"location": "/lib2/index.html"}, ENDS_WITH)
3845

3946
// We try again to see if it goes to the only result
4047
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"

0 commit comments

Comments
 (0)