diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-05-30 17:07:21 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-05-30 17:07:21 +0200 |
| commit | 16d5cdc570b45a17a9c85953244ef6058929f608 (patch) | |
| tree | f50643733c4abc07980326c540f1c5078a33394f | |
| parent | f3eae89b33fbd729fb6c401b42daa672bdd1751c (diff) | |
| download | rust-16d5cdc570b45a17a9c85953244ef6058929f608.tar.gz rust-16d5cdc570b45a17a9c85953244ef6058929f608.zip | |
Improve source-code-page.goml GUI test code
| -rw-r--r-- | src/test/rustdoc-gui/source-code-page.goml | 6 |
1 files changed, 3 insertions, 3 deletions
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"}) |
