]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/source-code-page.goml
Rollup merge of #93469 - compiler-errors:issue-93450, r=estebank
[rust.git] / src / test / rustdoc-gui / source-code-page.goml
1 // Checks that the interactions with the source code pages are workined as expected.
2 goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
3 // Check that we can click on the line number.
4 click: ".line-numbers > span:nth-child(4)" // This is the span for line 4.
5 // Unfortunately, "#4" isn't a valid query selector, so we have to go around that limitation
6 // by instead getting the nth span.
7 assert-attribute: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"})
8 // We now check that the good spans are highlighted
9 goto: file://|DOC_PATH|/src/test_docs/lib.rs.html#4-6
10 assert-attribute-false: (".line-numbers > span:nth-child(3)", {"class": "line-highlighted"})
11 assert-attribute: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"})
12 assert-attribute: (".line-numbers > span:nth-child(5)", {"class": "line-highlighted"})
13 assert-attribute: (".line-numbers > span:nth-child(6)", {"class": "line-highlighted"})
14 assert-attribute-false: (".line-numbers > span:nth-child(7)", {"class": "line-highlighted"})
15 // This is to ensure that the content is correctly align with the line numbers.
16 compare-elements-position: ("//*[@id='1']", ".rust > code > span", ("y"))
17
18 // Assert that the line numbers text is aligned to the right.
19 assert-css: (".line-numbers", {"text-align": "right"})