mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Improve source-code-page.goml GUI test code
This commit is contained in:
parent
f3eae89b33
commit
16d5cdc570
@ -2,9 +2,9 @@
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
|
||||
// Check that we can click on the line number.
|
||||
click: ".line-numbers > span:nth-child(4)" // This is the span for line 4.
|
||||
// Unfortunately, "#4" isn't a valid query selector, so we have to go around that limitation
|
||||
// by instead getting the nth span.
|
||||
assert-attribute: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"})
|
||||
// Ensure that the page URL was updated.
|
||||
assert-document-property: ({"URL": "#4"}, ENDS_WITH)
|
||||
assert-attribute: ("//*[@id='4']", {"class": "line-highlighted"})
|
||||
// We now check that the good spans are highlighted
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html#4-6
|
||||
assert-attribute-false: (".line-numbers > span:nth-child(3)", {"class": "line-highlighted"})
|
||||
|
Loading…
Reference in New Issue
Block a user