about summary refs log tree commit diff
path: root/src/test/rustdoc-gui/scrape-examples-layout.goml
blob: 988c911b7839a63f1f10f9823c8f14da3b342260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Check that the line number column has the correct layout.
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"

// Check that it's not zero.
assert-property-false: (
    ".more-scraped-examples .scraped-example .code-wrapper .src-line-numbers",
    {"clientWidth": "0"}
)

// Check that examples with very long lines have the same width as ones that don't.
store-property: (
    clientWidth,
    ".more-scraped-examples .scraped-example:nth-child(1) .code-wrapper .src-line-numbers",
    "clientWidth"
)

assert-property: (
    ".more-scraped-examples .scraped-example:nth-child(2) .code-wrapper .src-line-numbers",
    {"clientWidth": |clientWidth|}
)

assert-property: (
    ".more-scraped-examples .scraped-example:nth-child(3) .code-wrapper .src-line-numbers",
    {"clientWidth": |clientWidth|}
)

assert-property: (
    ".more-scraped-examples .scraped-example:nth-child(4) .code-wrapper .src-line-numbers",
    {"clientWidth": |clientWidth|}
)

assert-property: (
    ".more-scraped-examples .scraped-example:nth-child(5) .code-wrapper .src-line-numbers",
    {"clientWidth": |clientWidth|}
)