Use STARTS_WITH, since it's more specific

Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
This commit is contained in:
Michael Howell 2022-05-01 15:40:46 -07:00
parent 6c8a2d4715
commit 345a580e8d

View file

@ -5,7 +5,7 @@ write: (".search-input", "Foo")
// Waiting for the search results to appear...
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Names", CONTAINS)
assert-text: ("#titles > button:nth-of-type(1)", "In Names", STARTS_WITH)
// Now try search-by-return
goto: file://|DOC_PATH|/test_docs/index.html
@ -13,7 +13,7 @@ write: (".search-input", "-> String")
// Waiting for the search results to appear...
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)
// Try with a search-by-return with no results
goto: file://|DOC_PATH|/test_docs/index.html
@ -21,7 +21,7 @@ write: (".search-input", "-> Something")
// Waiting for the search results to appear...
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)
// Try with a search-by-return with no results
goto: file://|DOC_PATH|/test_docs/index.html
@ -29,4 +29,4 @@ write: (".search-input", "usize pattern")
// Waiting for the search results to appear...
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", CONTAINS)
assert-text: ("#titles > button:nth-of-type(1)", "In Function Signature", STARTS_WITH)