2023-01-01 10:21:19 -06:00
|
|
|
// This test checks the appearance of the tables in the doc comments.
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
|
2022-08-26 10:27:31 -05:00
|
|
|
|
|
|
|
compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
|
|
|
|
compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])
|
2022-12-08 10:38:27 -06:00
|
|
|
|
|
|
|
define-function: (
|
|
|
|
"check-colors",
|
|
|
|
(theme, border_color, zebra_stripe_color),
|
2023-01-06 08:18:51 -06:00
|
|
|
block {
|
2023-04-11 12:11:34 -05:00
|
|
|
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
2023-01-06 08:18:51 -06:00
|
|
|
reload:
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(1)", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"background-color": "rgba(0, 0, 0, 0)",
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(2)", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"background-color": |zebra_stripe_color|,
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(3)", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"background-color": "rgba(0, 0, 0, 0)",
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(4)", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"background-color": |zebra_stripe_color|,
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table td", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"border-style": "solid",
|
|
|
|
"border-width": "1px",
|
|
|
|
"border-color": |border_color|,
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table th", {
|
2022-12-08 10:38:27 -06:00
|
|
|
"border-style": "solid",
|
|
|
|
"border-width": "1px",
|
|
|
|
"border-color": |border_color|,
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
}
|
2022-12-08 10:38:27 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-colors", {
|
2023-08-20 07:44:36 -05:00
|
|
|
"theme": "ayu",
|
|
|
|
"border_color": "#5c6773",
|
|
|
|
"zebra_stripe_color": "#191f26",
|
2022-12-08 10:38:27 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-colors", {
|
2023-08-20 07:44:36 -05:00
|
|
|
"theme": "dark",
|
|
|
|
"border_color": "#e0e0e0",
|
|
|
|
"zebra_stripe_color": "#2a2a2a",
|
2022-12-08 10:38:27 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-colors", {
|
|
|
|
"theme": "light",
|
2023-08-20 07:44:36 -05:00
|
|
|
"border_color": "#e0e0e0",
|
|
|
|
"zebra_stripe_color": "#f5f5f5",
|
2022-12-08 10:38:27 -06:00
|
|
|
})
|