fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Check that the line number column has the correct layout. 2go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html" 3 4// Check that it's not zero. 5assert-property-false: ( 6 ".more-scraped-examples .scraped-example .code-wrapper .src-line-numbers", 7 {"clientWidth": "0"} 8) 9 10// Check that examples with very long lines have the same width as ones that don't. 11store-property: ( 12 ".more-scraped-examples .scraped-example:nth-child(2) .code-wrapper .src-line-numbers", 13 {"clientWidth": clientWidth}, 14) 15 16assert-property: ( 17 ".more-scraped-examples .scraped-example:nth-child(3) .code-wrapper .src-line-numbers", 18 {"clientWidth": |clientWidth|} 19) 20 21assert-property: ( 22 ".more-scraped-examples .scraped-example:nth-child(4) .code-wrapper .src-line-numbers", 23 {"clientWidth": |clientWidth|} 24) 25 26assert-property: ( 27 ".more-scraped-examples .scraped-example:nth-child(5) .code-wrapper .src-line-numbers", 28 {"clientWidth": |clientWidth|} 29) 30 31assert-property: ( 32 ".more-scraped-examples .scraped-example:nth-child(6) .code-wrapper .src-line-numbers", 33 {"clientWidth": |clientWidth|} 34) 35 36// Check that for both mobile and desktop sizes, the buttons in scraped examples are displayed 37// correctly. 38 39store-value: (offset_y, 4) 40 41// First with desktop 42assert-position: (".scraped-example .code-wrapper", {"y": 226}) 43assert-position: (".scraped-example .code-wrapper .prev", {"y": 226 + |offset_y|}) 44 45// Then with mobile 46set-window-size: (600, 600) 47assert-position: (".scraped-example .code-wrapper", {"y": 308}) 48assert-position: (".scraped-example .code-wrapper .prev", {"y": 308 + |offset_y|})