From ea55d25465f8dffc8283c0260f8dfa42076ba847 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 16 Jun 2023 20:41:00 +0200 Subject: [PATCH] Add regression test for #112676 --- tests/rustdoc-gui/setting-go-to-only-result.goml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/rustdoc-gui/setting-go-to-only-result.goml b/tests/rustdoc-gui/setting-go-to-only-result.goml index c5720b4bf1a..45e0b349051 100644 --- a/tests/rustdoc-gui/setting-go-to-only-result.goml +++ b/tests/rustdoc-gui/setting-go-to-only-result.goml @@ -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 . +// 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"