2023-01-01 16:21:19 +00:00
|
|
|
// This test checks the appearance of the tables in the doc comments.
|
2024-04-05 19:38:55 +00:00
|
|
|
include: "utils.goml"
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
|
2022-08-26 15:27:31 +00: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 16:38:27 +00:00
|
|
|
|
|
|
|
define-function: (
|
|
|
|
"check-colors",
|
2024-04-01 19:11:22 +00:00
|
|
|
[theme, border_color, zebra_stripe_color],
|
2023-01-06 14:18:51 +00:00
|
|
|
block {
|
2024-04-05 19:38:55 +00:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
2023-01-06 14:18:51 +00:00
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(1)", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"background-color": "rgba(0, 0, 0, 0)",
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(2)", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"background-color": |zebra_stripe_color|,
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(3)", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"background-color": "rgba(0, 0, 0, 0)",
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table tbody tr:nth-child(4)", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"background-color": |zebra_stripe_color|,
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table td", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"border-style": "solid",
|
|
|
|
"border-width": "1px",
|
|
|
|
"border-color": |border_color|,
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
assert-css: (".top-doc .docblock table th", {
|
2022-12-08 16:38:27 +00:00
|
|
|
"border-style": "solid",
|
|
|
|
"border-width": "1px",
|
|
|
|
"border-color": |border_color|,
|
2023-01-06 14:18:51 +00:00
|
|
|
})
|
|
|
|
}
|
2022-12-08 16:38:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-colors", {
|
2023-08-20 12:44:36 +00:00
|
|
|
"theme": "ayu",
|
|
|
|
"border_color": "#5c6773",
|
|
|
|
"zebra_stripe_color": "#191f26",
|
2022-12-08 16:38:27 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-colors", {
|
2023-08-20 12:44:36 +00:00
|
|
|
"theme": "dark",
|
|
|
|
"border_color": "#e0e0e0",
|
|
|
|
"zebra_stripe_color": "#2a2a2a",
|
2022-12-08 16:38:27 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-colors", {
|
|
|
|
"theme": "light",
|
2023-08-20 12:44:36 +00:00
|
|
|
"border_color": "#e0e0e0",
|
|
|
|
"zebra_stripe_color": "#f5f5f5",
|
2022-12-08 16:38:27 +00:00
|
|
|
})
|