2022-12-20 17:32:35 +00:00
|
|
|
// Check that the line number column has the correct layout.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
2022-12-20 17:32:35 +00:00
|
|
|
|
|
|
|
// 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: (
|
2022-12-22 01:03:31 +00:00
|
|
|
".more-scraped-examples .scraped-example:nth-child(2) .code-wrapper .src-line-numbers",
|
2023-05-10 08:56:59 +00:00
|
|
|
{"clientWidth": clientWidth},
|
2022-12-20 17:32:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
assert-property: (
|
2022-12-22 01:03:31 +00:00
|
|
|
".more-scraped-examples .scraped-example:nth-child(3) .code-wrapper .src-line-numbers",
|
2022-12-20 17:32:35 +00:00
|
|
|
{"clientWidth": |clientWidth|}
|
|
|
|
)
|
|
|
|
|
|
|
|
assert-property: (
|
2022-12-22 01:03:31 +00:00
|
|
|
".more-scraped-examples .scraped-example:nth-child(4) .code-wrapper .src-line-numbers",
|
2022-12-20 17:32:35 +00:00
|
|
|
{"clientWidth": |clientWidth|}
|
|
|
|
)
|
|
|
|
|
|
|
|
assert-property: (
|
2022-12-22 01:03:31 +00:00
|
|
|
".more-scraped-examples .scraped-example:nth-child(5) .code-wrapper .src-line-numbers",
|
2022-12-20 17:32:35 +00:00
|
|
|
{"clientWidth": |clientWidth|}
|
|
|
|
)
|
|
|
|
|
|
|
|
assert-property: (
|
2022-12-22 01:03:31 +00:00
|
|
|
".more-scraped-examples .scraped-example:nth-child(6) .code-wrapper .src-line-numbers",
|
2022-12-20 17:32:35 +00:00
|
|
|
{"clientWidth": |clientWidth|}
|
|
|
|
)
|
2022-12-30 15:27:56 +00:00
|
|
|
|
|
|
|
// Check that for both mobile and desktop sizes, the buttons in scraped examples are displayed
|
|
|
|
// correctly.
|
|
|
|
|
|
|
|
store-value: (offset_y, 4)
|
|
|
|
|
|
|
|
// First with desktop
|
2023-05-10 08:56:59 +00:00
|
|
|
assert-position: (".scraped-example .code-wrapper", {"y": 226})
|
|
|
|
assert-position: (".scraped-example .code-wrapper .prev", {"y": 226 + |offset_y|})
|
2022-12-30 15:27:56 +00:00
|
|
|
|
|
|
|
// Then with mobile
|
2023-04-11 17:11:34 +00:00
|
|
|
set-window-size: (600, 600)
|
2023-02-12 19:27:40 +00:00
|
|
|
assert-position: (".scraped-example .code-wrapper", {"y": 308})
|
|
|
|
assert-position: (".scraped-example .code-wrapper .prev", {"y": 308 + |offset_y|})
|