From 8968c0e48f460d042f20d79aa0ff8ef6b317f086 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 22 May 2021 16:41:26 +0200 Subject: [PATCH] Add test for search result resize width --- src/test/rustdoc-gui/search-result-display.goml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/rustdoc-gui/search-result-display.goml diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml new file mode 100644 index 000000000000..96d15c624f11 --- /dev/null +++ b/src/test/rustdoc-gui/search-result-display.goml @@ -0,0 +1,12 @@ +goto: file://|DOC_PATH|/test_docs/index.html +size: (900, 1000) +write: (".search-input", "test") +// Waiting for the search results to appear... +wait-for: "#titles" +// The width is returned by "getComputedStyle" which returns the exact number instead of the +// CSS rule which is "50%"... +assert: (".search-results div.desc", {"width": "320px"}) +size: (600, 100) +// As counter-intuitive as it may seem, in this width, the width is "100%", which is why +// when computed it's larger. +assert: (".search-results div.desc", {"width": "570px"})