1
Fork 0

Rollup merge of #111549 - GuillaumeGomez:update-gui-format, r=notriddle

[rustdoc] Convert more GUI tests colors to their original format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

The update for the `browser-ui-test` version is about improvements for color handling (alpha for hex format in particular).

r? `@notriddle`
This commit is contained in:
Matthias Krüger 2023-05-14 08:21:40 +02:00 committed by GitHub
commit d1cd1273f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 87 additions and 87 deletions

View file

@ -47,89 +47,89 @@ reload:
wait-for: "#search-tabs" wait-for: "#search-tabs"
assert-css: ( assert-css: (
"#search-tabs > button > .count", "#search-tabs > button > .count",
{"color": "rgb(136, 136, 136)"}, {"color": "#888"},
ALL, ALL,
) )
assert-css: ( assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']", "//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(197, 197, 197)"}, {"color": "#c5c5c5"},
) )
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']", "//*[@class='result-name']/*[text()='test_docs::']",
{"color": "rgb(0, 150, 207)"}, {"color": "#0096cf"},
) )
// Checking the color of the bottom border. // Checking the color of the bottom border.
assert-css: ( assert-css: (
".search-results > a", ".search-results > a",
{"border-bottom-color": "rgba(170, 170, 170, 0.2)"} {"border-bottom-color": "#aaa3"}
) )
// Checking the color of "keyword" text. // Checking the color of "keyword" text.
assert-css: ( assert-css: (
"//*[@class='result-name']//*[text()='(keyword)']", "//*[@class='result-name']//*[text()='(keyword)']",
{"color": "rgb(120, 135, 151)"}, {"color": "#788797"},
) )
store-value: (entry_color, "rgb(0, 150, 207)") // color of the search entry store-value: (entry_color, "#0096cf") // color of the search entry
store-value: (hover_entry_color, "rgb(255, 255, 255)") // color of the hovered/focused search entry store-value: (hover_entry_color, "#fff") // color of the hovered/focused search entry
store-value: (background_color, "rgba(0, 0, 0, 0)") // background color store-value: (background_color, "transparent") // background color
store-value: (hover_background_color, "rgb(60, 60, 60)") // hover background color store-value: (hover_background_color, "#3c3c3c") // hover background color
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"keyword", // item kind "keyword", // item kind
"rgb(57, 175, 215)", // color of item kind "#39afd7", // color of item kind
"rgb(57, 175, 215)", // color of hovered/focused item kind "#39afd7", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"struct", // item kind "struct", // item kind
"rgb(255, 160, 165)", // color of item kind "#ffa0a5", // color of item kind
"rgb(255, 160, 165)", // color of hovered/focused item kind "#ffa0a5", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"associatedtype", // item kind "associatedtype", // item kind
"rgb(57, 175, 215)", // color of item kind "#39afd7", // color of item kind
"rgb(57, 175, 215)", // color of hovered/focused item kind "#39afd7", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"tymethod", // item kind "tymethod", // item kind
"rgb(253, 214, 135)", // color of item kind "#fdd687", // color of item kind
"rgb(253, 214, 135)", // color of hovered/focused item kind "#fdd687", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"method", // item kind "method", // item kind
"rgb(253, 214, 135)", // color of item kind "#fdd687", // color of item kind
"rgb(253, 214, 135)", // color of hovered/focused item kind "#fdd687", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"structfield", // item kind "structfield", // item kind
"rgb(0, 150, 207)", // color of item kind "#0096cf", // color of item kind
"rgb(255, 255, 255)", // color of hovered/focused item kind "#fff", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"macro", // item kind "macro", // item kind
"rgb(163, 122, 204)", // color of item kind "#a37acc", // color of item kind
"rgb(163, 122, 204)", // color of hovered/focused item kind "#a37acc", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"fn", // item kind "fn", // item kind
"rgb(253, 214, 135)", // color of item kind "#fdd687", // color of item kind
"rgb(253, 214, 135)", // color of hovered/focused item kind "#fdd687", // color of hovered/focused item kind
), ),
) )
@ -138,7 +138,7 @@ move-cursor-to: ".search-input"
focus: ".search-input" // To ensure the `<a>` container isnt focus or hover. focus: ".search-input" // To ensure the `<a>` container isnt focus or hover.
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
{"color": "rgb(0, 150, 207)", "background-color": "rgba(0, 0, 0, 0)"}, {"color": "#0096cf", "background-color": "transparent"},
ALL, ALL,
) )
@ -146,11 +146,11 @@ assert-css: (
move-cursor-to: "//*[@class='desc'][text()='Just a normal struct.']" move-cursor-to: "//*[@class='desc'][text()='Just a normal struct.']"
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']", "//*[@class='result-name']/*[text()='test_docs::']",
{"color": "rgb(255, 255, 255)"}, {"color": "#fff"},
) )
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
{"color": "rgb(255, 255, 255)", "background-color": "rgb(60, 60, 60)"}, {"color": "#fff", "background-color": "rgb(60, 60, 60)"},
) )
// Dark theme // Dark theme
@ -164,89 +164,89 @@ reload:
wait-for: "#search-tabs" wait-for: "#search-tabs"
assert-css: ( assert-css: (
"#search-tabs > button > .count", "#search-tabs > button > .count",
{"color": "rgb(136, 136, 136)"}, {"color": "#888"},
ALL, ALL,
) )
assert-css: ( assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']", "//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(221, 221, 221)"}, {"color": "#ddd"},
) )
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']", "//*[@class='result-name']/*[text()='test_docs::']",
{"color": "rgb(221, 221, 221)"}, {"color": "#ddd"},
) )
// Checking the color of the bottom border. // Checking the color of the bottom border.
assert-css: ( assert-css: (
".search-results > a", ".search-results > a",
{"border-bottom-color": "rgba(170, 170, 170, 0.2)"} {"border-bottom-color": "#aaa3"}
) )
// Checking the color for "keyword" text. // Checking the color for "keyword" text.
assert-css: ( assert-css: (
"//*[@class='result-name']//*[text()='(keyword)']", "//*[@class='result-name']//*[text()='(keyword)']",
{"color": "rgb(221, 221, 221)"}, {"color": "#ddd"},
) )
store-value: (entry_color, "rgb(221, 221, 221)") // color of the search entry store-value: (entry_color, "#ddd") // color of the search entry
store-value: (hover_entry_color, "rgb(221, 221, 221)") // color of the hovered/focused search entry store-value: (hover_entry_color, "#ddd") // color of the hovered/focused search entry
store-value: (background_color, "rgba(0, 0, 0, 0)") // background color store-value: (background_color, "transparent") // background color
store-value: (hover_background_color, "rgb(97, 97, 97)") // hover background color store-value: (hover_background_color, "#616161") // hover background color
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"keyword", // item kind "keyword", // item kind
"rgb(210, 153, 29)", // color of item kind "#d2991d", // color of item kind
"rgb(210, 153, 29)", // color of hovered/focused item kind "#d2991d", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"struct", // item kind "struct", // item kind
"rgb(45, 191, 184)", // color of item kind "#2dbfb8", // color of item kind
"rgb(45, 191, 184)", // color of hovered/focused item kind "#2dbfb8", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"associatedtype", // item kind "associatedtype", // item kind
"rgb(210, 153, 29)", // color of item kind "#d2991d", // color of item kind
"rgb(210, 153, 29)", // color of hovered/focused item kind "#d2991d", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"tymethod", // item kind "tymethod", // item kind
"rgb(43, 171, 99)", // color of item kind "#2bab63", // color of item kind
"rgb(43, 171, 99)", // color of hovered/focused item kind "#2bab63", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"method", // item kind "method", // item kind
"rgb(43, 171, 99)", // color of item kind "#2bab63", // color of item kind
"rgb(43, 171, 99)", // color of hovered/focused item kind "#2bab63", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"structfield", // item kind "structfield", // item kind
"rgb(221, 221, 221)", // color of item kind "#ddd", // color of item kind
"rgb(221, 221, 221)", // color of hovered/focused item kind "#ddd", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"macro", // item kind "macro", // item kind
"rgb(9, 189, 0)", // color of item kind "#09bd00", // color of item kind
"rgb(9, 189, 0)", // color of hovered/focused item kind "#09bd00", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"fn", // item kind "fn", // item kind
"rgb(43, 171, 99)", // color of item kind "#2bab63", // color of item kind
"rgb(43, 171, 99)", // color of hovered/focused item kind "#2bab63", // color of hovered/focused item kind
), ),
) )
@ -255,7 +255,7 @@ move-cursor-to: ".search-input"
focus: ".search-input" // To ensure the `<a>` container isnt focus or hover. focus: ".search-input" // To ensure the `<a>` container isnt focus or hover.
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
{"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"}, {"color": "#ddd", "background-color": "transparent"},
) )
// Light theme // Light theme
@ -266,89 +266,89 @@ reload:
wait-for: "#search-tabs" wait-for: "#search-tabs"
assert-css: ( assert-css: (
"#search-tabs > button > .count", "#search-tabs > button > .count",
{"color": "rgb(136, 136, 136)"}, {"color": "#888"},
ALL, ALL,
) )
assert-css: ( assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']", "//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(0, 0, 0)"}, {"color": "#000"},
) )
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']", "//*[@class='result-name']/*[text()='test_docs::']",
{"color": "rgb(0, 0, 0)"}, {"color": "#000"},
) )
// Checking the color of the bottom border. // Checking the color of the bottom border.
assert-css: ( assert-css: (
".search-results > a", ".search-results > a",
{"border-bottom-color": "rgba(170, 170, 170, 0.2)"} {"border-bottom-color": "#aaa3"}
) )
// Checking the color for "keyword" text. // Checking the color for "keyword" text.
assert-css: ( assert-css: (
"//*[@class='result-name']//*[text()='(keyword)']", "//*[@class='result-name']//*[text()='(keyword)']",
{"color": "rgb(0, 0, 0)"}, {"color": "#000"},
) )
store-value: (entry_color, "rgb(0, 0, 0)") // color of the search entry store-value: (entry_color, "#000") // color of the search entry
store-value: (hover_entry_color, "rgb(0, 0, 0)") // color of the hovered/focused search entry store-value: (hover_entry_color, "#000") // color of the hovered/focused search entry
store-value: (background_color, "rgba(0, 0, 0, 0)") // background color store-value: (background_color, "transparent") // background color
store-value: (hover_background_color, "rgb(204, 204, 204)") // hover background color store-value: (hover_background_color, "#ccc") // hover background color
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"keyword", // item kind "keyword", // item kind
"rgb(56, 115, 173)", // color of item kind "#3873ad", // color of item kind
"rgb(56, 115, 173)", // color of hovered/focused item kind "#3873ad", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"struct", // item kind "struct", // item kind
"rgb(173, 55, 138)", // color of item kind "#ad378a", // color of item kind
"rgb(173, 55, 138)", // color of hovered/focused item kind "#ad378a", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"associatedtype", // item kind "associatedtype", // item kind
"rgb(56, 115, 173)", // color of item kind "#3873ad", // color of item kind
"rgb(56, 115, 173)", // color of hovered/focused item kind "#3873ad", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"tymethod", // item kind "tymethod", // item kind
"rgb(173, 124, 55)", // color of item kind "#ad7c37", // color of item kind
"rgb(173, 124, 55)", // color of hovered/focused item kind "#ad7c37", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"method", // item kind "method", // item kind
"rgb(173, 124, 55)", // color of item kind "#ad7c37", // color of item kind
"rgb(173, 124, 55)", // color of hovered/focused item kind "#ad7c37", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"structfield", // item kind "structfield", // item kind
"rgb(0, 0, 0)", // color of item kind "#000", // color of item kind
"rgb(0, 0, 0)", // color of hovered/focused item kind "#000", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"macro", // item kind "macro", // item kind
"rgb(6, 128, 0)", // color of item kind "#068000", // color of item kind
"rgb(6, 128, 0)", // color of hovered/focused item kind "#068000", // color of hovered/focused item kind
), ),
) )
call-function: ( call-function: (
"check-result-color", ( "check-result-color", (
"fn", // item kind "fn", // item kind
"rgb(173, 124, 55)", // color of item kind "#ad7c37", // color of item kind
"rgb(173, 124, 55)", // color of hovered/focused item kind "#ad7c37", // color of hovered/focused item kind
), ),
) )
@ -357,7 +357,7 @@ move-cursor-to: ".search-input"
focus: ".search-input" // To ensure the `<a>` container isnt focus or hover. focus: ".search-input" // To ensure the `<a>` container isnt focus or hover.
assert-css: ( assert-css: (
"//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
{"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"}, {"color": "#000", "background-color": "transparent"},
) )
// Check the alias. // Check the alias.
@ -386,16 +386,16 @@ define-function: (
call-function: ("check-alias", { call-function: ("check-alias", {
"theme": "ayu", "theme": "ayu",
"alias": "rgb(197, 197, 197)", "alias": "#c5c5c5",
"grey": "rgb(153, 153, 153)", "grey": "#999",
}) })
call-function: ("check-alias", { call-function: ("check-alias", {
"theme": "dark", "theme": "dark",
"alias": "rgb(255, 255, 255)", "alias": "#fff",
"grey": "rgb(204, 204, 204)", "grey": "#ccc",
}) })
call-function: ("check-alias", { call-function: ("check-alias", {
"theme": "light", "theme": "light",
"alias": "rgb(0, 0, 0)", "alias": "#000",
"grey": "rgb(153, 153, 153)", "grey": "#999",
}) })