From bdbaeae689a954042d87bf189a39216ec5f20e4e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 13 Dec 2024 14:53:51 +0100 Subject: [PATCH] Fix rustdoc GUI test --- tests/rustdoc-gui/search-result-color.goml | 2 +- tests/rustdoc-gui/search-result-keyword.goml | 4 ++-- tests/rustdoc-gui/search-tab.goml | 2 +- tests/rustdoc-gui/src/test_docs/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/rustdoc-gui/search-result-color.goml b/tests/rustdoc-gui/search-result-color.goml index e8da43eb896bc..bd9463a096813 100644 --- a/tests/rustdoc-gui/search-result-color.goml +++ b/tests/rustdoc-gui/search-result-color.goml @@ -140,7 +140,7 @@ define-function: ( }, ) -go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=coo" +go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=fo" // This is needed so that the text color is computed. show-text: true diff --git a/tests/rustdoc-gui/search-result-keyword.goml b/tests/rustdoc-gui/search-result-keyword.goml index f0645c0bdbee2..02305f2587c9c 100644 --- a/tests/rustdoc-gui/search-result-keyword.goml +++ b/tests/rustdoc-gui/search-result-keyword.goml @@ -1,8 +1,8 @@ // Checks that the "keyword" results have the expected text alongside them. go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" -write-into: (".search-input", "auto") +write-into: (".search-input", "for") // To be SURE that the search will be run. press-key: 'Enter' // Waiting for the search results to appear... wait-for: "#search-tabs" -assert-text: (".result-keyword .result-name", "keyword auto") +assert-text: (".result-keyword .result-name", "keyword for") diff --git a/tests/rustdoc-gui/search-tab.goml b/tests/rustdoc-gui/search-tab.goml index 4329726398c10..3879c127fd0f8 100644 --- a/tests/rustdoc-gui/search-tab.goml +++ b/tests/rustdoc-gui/search-tab.goml @@ -78,7 +78,7 @@ call-function: ("check-colors", { set-window-size: (851, 600) // Check the size and count in tabs -assert-text: ("#search-tabs > button:nth-child(1) > .count", " (25) ") +assert-text: ("#search-tabs > button:nth-child(1) > .count", " (26) ") assert-text: ("#search-tabs > button:nth-child(2) > .count", " (6)  ") assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0)  ") store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth}) diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs index 77b7c71841e7f..dae13d9ac1808 100644 --- a/tests/rustdoc-gui/src/test_docs/lib.rs +++ b/tests/rustdoc-gui/src/test_docs/lib.rs @@ -156,7 +156,7 @@ pub enum AnEnum { WithVariants { and: usize, sub: usize, variants: usize }, } -#[doc(keyword = "auto")] +#[doc(keyword = "for")] /// Some keyword. pub mod keyword {}