Skip to content

Commit

Permalink
Fix rustdoc GUI test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 13, 2024
1 parent 353aff4 commit bdbaeae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/rustdoc-gui/search-result-color.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-gui/search-result-keyword.goml
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion tests/rustdoc-gui/search-tab.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-gui/src/test_docs/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

Expand Down

0 comments on commit bdbaeae

Please sign in to comment.