Skip to content

Commit 345a580

Browse files
Use STARTS_WITH, since it's more specific
Co-Authored-By: Guillaume Gomez <[email protected]>
1 parent 6c8a2d4 commit 345a580

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/rustdoc-gui/search-tab-change-title-fn-sig.goml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ write: (".search-input", "Foo")
55
// Waiting for the search results to appear...
66
wait-for: "#titles"
77
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
8-
assert-text: ("#titles > button:nth-of-type(1)", "In Names", CONTAINS)
8+
assert-text: ("#titles > button:nth-of-type(1)", "In Names", STARTS_WITH)
99

1010
// Now try search-by-return
1111
goto: file://|DOC_PATH|/test_docs/index.html
1212
write: (".search-input", "-> String")
1313
// Waiting for the search results to appear...
1414
wait-for: "#titles"
1515
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
16-
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
16+
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)
1717

1818
// Try with a search-by-return with no results
1919
goto: file://|DOC_PATH|/test_docs/index.html
2020
write: (".search-input", "-> Something")
2121
// Waiting for the search results to appear...
2222
wait-for: "#titles"
2323
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
24-
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
24+
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)
2525

2626
// Try with a search-by-return with no results
2727
goto: file://|DOC_PATH|/test_docs/index.html
2828
write: (".search-input", "usize pattern")
2929
// Waiting for the search results to appear...
3030
wait-for: "#titles"
3131
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
32-
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
32+
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)

0 commit comments

Comments
 (0)