diff --git a/src/test/rustdoc-gui/source-code-page.goml b/src/test/rustdoc-gui/source-code-page.goml index ad7080c39b8..f31acc80f7e 100644 --- a/src/test/rustdoc-gui/source-code-page.goml +++ b/src/test/rustdoc-gui/source-code-page.goml @@ -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"})