Add regression test for #112676

This commit is contained in:
Guillaume Gomez 2023-06-16 20:41:00 +02:00
parent f4316392a7
commit ea55d25465

View File

@ -34,7 +34,14 @@ go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
// We enter it into the search.
write: (".search-input", "HasALongTraitWithParams")
wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"}
assert-document-property: ({"URL": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
assert-window-property: ({"location": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
// Regression test for <https://github.com/rust-lang/rust/issues/112676>.
// If "go-to-only-result" is enabled and you go back to history, it should not lead you back to the
// page result again automatically.
history-go-back:
wait-for-document-property: {"title": "lib2 - Rust"}
assert-window-property: ({"location": "/lib2/index.html"}, ENDS_WITH)
// We try again to see if it goes to the only result
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"