From 2ff14448863ac1a1dd9533461708e29aae170c2d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:31 +0200 Subject: Adding debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- src/test/rustdoc-gui/anchors.goml | 128 ++++++++++- src/test/rustdoc-gui/check_info_sign_position.goml | 8 +- src/test/rustdoc-gui/code-tags.goml | 4 +- src/test/rustdoc-gui/codeblock-tooltip.goml | 96 ++++++++ src/test/rustdoc-gui/docblock-table-overflow.goml | 4 +- src/test/rustdoc-gui/docblock-table.goml | 4 + src/test/rustdoc-gui/headings.goml | 6 +- src/test/rustdoc-gui/item-info-alignment.goml | 10 + src/test/rustdoc-gui/item-summary-table.goml | 2 +- src/test/rustdoc-gui/label-next-to-symbol.goml | 26 +-- src/test/rustdoc-gui/links-color.goml | 85 +++++++ .../rustdoc-gui/overflow-tooltip-information.goml | 2 +- src/test/rustdoc-gui/pocket-menu.goml | 4 +- src/test/rustdoc-gui/search-filter.goml | 18 +- src/test/rustdoc-gui/search-form-elements.goml | 243 +++++++++++++++++++++ src/test/rustdoc-gui/search-input.goml | 23 -- src/test/rustdoc-gui/search-result-color.goml | 204 ++++++++++++++++- src/test/rustdoc-gui/search-result-display.goml | 31 ++- src/test/rustdoc-gui/sidebar-mobile-scroll.goml | 31 +++ .../rustdoc-gui/sidebar-source-code-display.goml | 15 +- src/test/rustdoc-gui/src/lib2/lib.rs | 40 ++++ src/test/rustdoc-gui/src/staged_api/Cargo.toml | 3 +- src/test/rustdoc-gui/src/staged_api/lib.rs | 2 + src/test/rustdoc-gui/src/test_docs/lib.rs | 32 +++ src/test/rustdoc-gui/toggle-click-deadspace.goml | 5 +- src/test/rustdoc-gui/type-declation-overflow.goml | 4 +- src/test/rustdoc-gui/where-whitespace.goml | 27 +++ 27 files changed, 959 insertions(+), 98 deletions(-) create mode 100644 src/test/rustdoc-gui/codeblock-tooltip.goml create mode 100644 src/test/rustdoc-gui/docblock-table.goml create mode 100644 src/test/rustdoc-gui/item-info-alignment.goml create mode 100644 src/test/rustdoc-gui/links-color.goml create mode 100644 src/test/rustdoc-gui/search-form-elements.goml delete mode 100644 src/test/rustdoc-gui/search-input.goml create mode 100644 src/test/rustdoc-gui/sidebar-mobile-scroll.goml create mode 100644 src/test/rustdoc-gui/where-whitespace.goml (limited to 'src/test/rustdoc-gui') diff --git a/src/test/rustdoc-gui/anchors.goml b/src/test/rustdoc-gui/anchors.goml index 84b8bbd1b..3ad62c721 100644 --- a/src/test/rustdoc-gui/anchors.goml +++ b/src/test/rustdoc-gui/anchors.goml @@ -1,6 +1,5 @@ // This test is to ensure that the anchors (`ยง`) have the expected color and position. -goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html -show-text: true +goto: file://|DOC_PATH|/staged_api/struct.Foo.html // This is needed to ensure that the text color is computed. show-text: true @@ -13,10 +12,31 @@ reload: assert-css: ("#toggle-all-docs", {"color": "rgb(0, 0, 0)"}) assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"}) assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"}) -assert-css: (".srclink", {"color": "rgb(56, 115, 173)"}) +assert-css: ( + ".rightside .srclink", + {"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"}, + ALL, +) +compare-elements-css: (".rightside .srclink", ".rightside.srclink", ["color", "text-decoration"]) +compare-elements-css: (".main-heading .srclink", ".rightside.srclink", ["color", "text-decoration"]) move-cursor-to: ".main-heading .srclink" -assert-css: (".srclink", {"text-decoration": "underline solid rgb(56, 115, 173)"}) +assert-css: ( + ".main-heading .srclink", + {"color": "rgb(56, 115, 173)", "text-decoration": "underline solid rgb(56, 115, 173)"}, +) +move-cursor-to: ".impl-items .rightside .srclink" +assert-css: ( + ".impl-items .rightside .srclink", + {"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"}, +) +move-cursor-to: ".impl-items .rightside.srclink" +assert-css: ( + ".impl-items .rightside.srclink", + {"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"}, +) + +goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"}) @@ -32,3 +52,103 @@ move-cursor-to: "#impl-HeavilyDocumentedStruct" assert-css: ("#impl-HeavilyDocumentedStruct a.anchor", {"color": "rgb(0, 0, 0)"}) assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"}) + +// +// We do the same checks with the dark theme now. +// +local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"} +goto: file://|DOC_PATH|/staged_api/struct.Foo.html + +assert-css: ("#toggle-all-docs", {"color": "rgb(221, 221, 221)"}) +assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(221, 221, 221)"}) +assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(45, 191, 184)"}) +assert-css: ( + ".rightside .srclink", + {"color": "rgb(210, 153, 29)", "text-decoration": "none solid rgb(210, 153, 29)"}, + ALL, +) +compare-elements-css: (".rightside .srclink", ".rightside.srclink", ["color", "text-decoration"]) +compare-elements-css: (".main-heading .srclink", ".rightside.srclink", ["color", "text-decoration"]) + +move-cursor-to: ".main-heading .srclink" +assert-css: ( + ".main-heading .srclink", + {"color": "rgb(210, 153, 29)", "text-decoration": "underline solid rgb(210, 153, 29)"}, +) +move-cursor-to: ".impl-items .rightside .srclink" +assert-css: ( + ".impl-items .rightside .srclink", + {"color": "rgb(210, 153, 29)", "text-decoration": "none solid rgb(210, 153, 29)"}, +) +move-cursor-to: ".impl-items .rightside.srclink" +assert-css: ( + ".impl-items .rightside.srclink", + {"color": "rgb(210, 153, 29)", "text-decoration": "none solid rgb(210, 153, 29)"}, +) + +goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html + +assert-css: ("#top-doc-prose-title", {"color": "rgb(221, 221, 221)"}) + +assert-css: (".sidebar a", {"color": "rgb(253, 191, 53)"}) +assert-css: (".in-band a", {"color": "rgb(221, 221, 221)"}) + +// We move the cursor over the "Implementations" title so the anchor is displayed. +move-cursor-to: "h2#implementations" +assert-css: ("h2#implementations a.anchor", {"color": "rgb(221, 221, 221)"}) + +// Same thing with the impl block title. +move-cursor-to: "#impl-HeavilyDocumentedStruct" +assert-css: ("#impl-HeavilyDocumentedStruct a.anchor", {"color": "rgb(221, 221, 221)"}) + +assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"}) + +// +// We do the same checks with the ayu theme now. +// +local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"} +goto: file://|DOC_PATH|/staged_api/struct.Foo.html + +assert-css: ("#toggle-all-docs", {"color": "rgb(197, 197, 197)"}) +assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(255, 255, 255)"}) +assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(255, 160, 165)"}) +assert-css: ( + ".rightside .srclink", + {"color": "rgb(57, 175, 215)", "text-decoration": "none solid rgb(57, 175, 215)"}, + ALL, +) +compare-elements-css: (".rightside .srclink", ".rightside.srclink", ["color", "text-decoration"]) +compare-elements-css: (".main-heading .srclink", ".rightside.srclink", ["color", "text-decoration"]) + +move-cursor-to: ".main-heading .srclink" +assert-css: ( + ".main-heading .srclink", + {"color": "rgb(57, 175, 215)", "text-decoration": "underline solid rgb(57, 175, 215)"}, +) +move-cursor-to: ".impl-items .rightside .srclink" +assert-css: ( + ".impl-items .rightside .srclink", + {"color": "rgb(57, 175, 215)", "text-decoration": "none solid rgb(57, 175, 215)"}, +) +move-cursor-to: ".impl-items .rightside.srclink" +assert-css: ( + ".impl-items .rightside.srclink", + {"color": "rgb(57, 175, 215)", "text-decoration": "none solid rgb(57, 175, 215)"}, +) + +goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html + +assert-css: ("#top-doc-prose-title", {"color": "rgb(255, 255, 255)"}) + +assert-css: (".sidebar a", {"color": "rgb(83, 177, 219)"}) +assert-css: (".in-band a", {"color": "rgb(255, 255, 255)"}) + +// We move the cursor over the "Implementations" title so the anchor is displayed. +move-cursor-to: "h2#implementations" +assert-css: ("h2#implementations a.anchor", {"color": "rgb(197, 197, 197)"}) + +// Same thing with the impl block title. +move-cursor-to: "#impl-HeavilyDocumentedStruct" +assert-css: ("#impl-HeavilyDocumentedStruct a.anchor", {"color": "rgb(197, 197, 197)"}) + +assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"}) diff --git a/src/test/rustdoc-gui/check_info_sign_position.goml b/src/test/rustdoc-gui/check_info_sign_position.goml index 3bed7a0a0..47a78f02f 100644 --- a/src/test/rustdoc-gui/check_info_sign_position.goml +++ b/src/test/rustdoc-gui/check_info_sign_position.goml @@ -4,8 +4,8 @@ goto: file://|DOC_PATH|/test_docs/index.html goto: ./fn.check_list_code_block.html // If the codeblock is the first element of the docblock, the information tooltip must have // have some top margin to avoid going over the toggle (the "[+]"). -assert-css: (".docblock > .information > .compile_fail", { "margin-top": "16px" }) +assert-css: (".docblock > .example-wrap.compile_fail .tooltip", { "margin-top": "16px" }) // Checks that the other codeblocks don't have this top margin. -assert-css: ("ol > li > .information > .compile_fail", { "margin-top": "0px" }) -assert-css: ("ol > li > .information > .ignore", { "margin-top": "0px" }) -assert-css: (".docblock > .information > .ignore", { "margin-top": "0px" }) +assert-css: ("ol > li > .example-wrap.compile_fail .tooltip", { "margin-top": "0px" }) +assert-css: ("ol > li > .example-wrap.ignore .tooltip", { "margin-top": "0px" }) +assert-css: (".docblock > .example-wrap.ignore .tooltip", { "margin-top": "0px" }) diff --git a/src/test/rustdoc-gui/code-tags.goml b/src/test/rustdoc-gui/code-tags.goml index 200569a28..8d399a9a5 100644 --- a/src/test/rustdoc-gui/code-tags.goml +++ b/src/test/rustdoc-gui/code-tags.goml @@ -1,9 +1,9 @@ // This test ensures that items and documentation code blocks are wrapped in

 goto: file://|DOC_PATH|/test_docs/fn.foo.html
 size: (1080, 600)
-// There should be three doc codeblocks
+// There should be four doc codeblocks.
 // Check that their content is inside 

-assert-count: (".example-wrap pre > code", 3)
+assert-count: (".example-wrap pre > code", 4)
 // Check that function signature is inside 

 assert: "pre.rust.fn > code"
 
diff --git a/src/test/rustdoc-gui/codeblock-tooltip.goml b/src/test/rustdoc-gui/codeblock-tooltip.goml
new file mode 100644
index 000000000..21a9e120c
--- /dev/null
+++ b/src/test/rustdoc-gui/codeblock-tooltip.goml
@@ -0,0 +1,96 @@
+// Checking the colors of the codeblocks tooltips.
+goto: file://|DOC_PATH|/test_docs/fn.foo.html
+show-text: true
+
+// Dark theme.
+local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
+reload:
+
+// compile_fail block
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.compile_fail"
+
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// should_panic block
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.should_panic"
+
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// ignore block
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"})
+
+move-cursor-to: ".docblock .example-wrap.ignore"
+
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"})
+
+
+// Light theme.
+local-storage: {"rustdoc-theme": "light"}
+reload:
+
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.compile_fail"
+
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// should_panic block
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.should_panic"
+
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// ignore block
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"})
+
+move-cursor-to: ".docblock .example-wrap.ignore"
+
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"})
+
+
+// Ayu theme.
+local-storage: {"rustdoc-theme": "ayu"}
+reload:
+
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.compile_fail"
+
+assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// should_panic block
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"})
+
+move-cursor-to: ".docblock .example-wrap.should_panic"
+
+assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"})
+assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"})
+
+// ignore block
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"})
+
+move-cursor-to: ".docblock .example-wrap.ignore"
+
+assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"})
+assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"})
diff --git a/src/test/rustdoc-gui/docblock-table-overflow.goml b/src/test/rustdoc-gui/docblock-table-overflow.goml
index af76d2ea4..7f97cf220 100644
--- a/src/test/rustdoc-gui/docblock-table-overflow.goml
+++ b/src/test/rustdoc-gui/docblock-table-overflow.goml
@@ -6,7 +6,7 @@ size: (1100, 800)
 compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
 assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
 // However, since there is overflow in the , its scroll width is bigger.
-assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
+assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
 
 // Checking it works on other doc blocks as well...
 
@@ -18,4 +18,4 @@ compare-elements-property: (
 )
 assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"})
 // However, since there is overflow in the 
, its scroll width is bigger. -assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"}) +assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"}) diff --git a/src/test/rustdoc-gui/docblock-table.goml b/src/test/rustdoc-gui/docblock-table.goml new file mode 100644 index 000000000..7263156ab --- /dev/null +++ b/src/test/rustdoc-gui/docblock-table.goml @@ -0,0 +1,4 @@ +goto: file://|DOC_PATH|/test_docs/doc_block_table/struct.DocBlockTable.html#method.func + +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"]) diff --git a/src/test/rustdoc-gui/headings.goml b/src/test/rustdoc-gui/headings.goml index 8c2c3df15..ed07e777b 100644 --- a/src/test/rustdoc-gui/headings.goml +++ b/src/test/rustdoc-gui/headings.goml @@ -247,12 +247,12 @@ assert-css: ( local-storage: {"rustdoc-theme": "light"} goto: file://|DOC_PATH|/staged_api/struct.Foo.html -assert-css: (".since", {"color": "rgb(128, 128, 128)"}) +assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL) local-storage: {"rustdoc-theme": "dark"} reload: -assert-css: (".since", {"color": "rgb(128, 128, 128)"}) +assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL) local-storage: {"rustdoc-theme": "ayu"} reload: -assert-css: (".since", {"color": "rgb(128, 128, 128)"}) +assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL) diff --git a/src/test/rustdoc-gui/item-info-alignment.goml b/src/test/rustdoc-gui/item-info-alignment.goml new file mode 100644 index 000000000..4d7b5045f --- /dev/null +++ b/src/test/rustdoc-gui/item-info-alignment.goml @@ -0,0 +1,10 @@ +// This test ensures that the "item-info" looks about the same +// whether or not it's inside a toggle. +goto: file://|DOC_PATH|/lib2/struct.ItemInfoAlignmentTest.html + +// First, we try it in "desktop" mode. +size: (1200, 870) +compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ("x")) +// Next, we try it in "mobile" mode (max-width: 700px). +size: (650, 650) +compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ("x")) diff --git a/src/test/rustdoc-gui/item-summary-table.goml b/src/test/rustdoc-gui/item-summary-table.goml index 6bf4e288c..4bff32b3d 100644 --- a/src/test/rustdoc-gui/item-summary-table.goml +++ b/src/test/rustdoc-gui/item-summary-table.goml @@ -3,4 +3,4 @@ goto: file://|DOC_PATH|/lib2/summary_table/index.html // We check that we picked the right item first. assert-text: (".item-table .item-left", "Foo") // Then we check that its summary is empty. -assert-text: (".item-table .item-right", "") +assert-false: ".item-table .item-right" diff --git a/src/test/rustdoc-gui/label-next-to-symbol.goml b/src/test/rustdoc-gui/label-next-to-symbol.goml index ca3994a08..4b4cea262 100644 --- a/src/test/rustdoc-gui/label-next-to-symbol.goml +++ b/src/test/rustdoc-gui/label-next-to-symbol.goml @@ -7,14 +7,14 @@ size: (1080, 600) assert: (".stab.deprecated") assert: (".stab.portability") -// make sure that deprecated and portability are different colours +// make sure that deprecated and portability have the right colors assert-css: ( ".item-table .item-left .stab.deprecated", - { "background-color": "rgb(255, 196, 196)" }, + { "background-color": "rgb(255, 245, 214)" }, ) assert-css: ( ".item-table .item-left .stab.portability", - { "background-color": "rgb(243, 223, 255)" }, + { "background-color": "rgb(255, 245, 214)" }, ) // table like view @@ -31,15 +31,9 @@ compare-elements-position: ( ) // Ensure no wrap -compare-elements-position-near: ( - "//*[@class='item-left module-item']//a[text()='replaced_function']", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", - {"y": 2}, -) -// compare parent elements compare-elements-position: ( "//*[@class='item-left module-item']//a[text()='replaced_function']/..", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) @@ -51,7 +45,7 @@ assert-css: (".item-right.docblock-short", { "padding-left": "32px" }) compare-elements-position-near: ( "//*[@class='item-left module-item']//a[text()='replaced_function']", ".item-left .stab.deprecated", - {"y": 1}, + {"y": 2}, ) compare-elements-position: ( ".item-left .stab.deprecated", @@ -60,19 +54,13 @@ compare-elements-position: ( ) // Ensure wrap -compare-elements-position-near-false: ( - "//*[@class='item-left module-item']//a[text()='replaced_function']", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", - {"y": 12}, -) -// compare parent elements compare-elements-position-false: ( "//*[@class='item-left module-item']//a[text()='replaced_function']/..", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) compare-elements-position-false: ( ".item-left .stab.deprecated", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) diff --git a/src/test/rustdoc-gui/links-color.goml b/src/test/rustdoc-gui/links-color.goml new file mode 100644 index 000000000..69c5b4a67 --- /dev/null +++ b/src/test/rustdoc-gui/links-color.goml @@ -0,0 +1,85 @@ +// This test checks links colors. +goto: file://|DOC_PATH|/test_docs/index.html + +// This is needed so that the text color is computed. +show-text: true + +// Ayu theme +local-storage: { + "rustdoc-theme": "ayu", + "rustdoc-use-system-theme": "false", +} +reload: + +assert-css: (".item-table .mod", {"color": "rgb(57, 175, 215)"}, ALL) +assert-css: (".item-table .macro", {"color": "rgb(163, 122, 204)"}, ALL) +assert-css: (".item-table .struct", {"color": "rgb(255, 160, 165)"}, ALL) +assert-css: (".item-table .enum", {"color": "rgb(255, 160, 165)"}, ALL) +assert-css: (".item-table .trait", {"color": "rgb(57, 175, 215)"}, ALL) +assert-css: (".item-table .fn", {"color": "rgb(253, 214, 135)"}, ALL) +assert-css: (".item-table .type", {"color": "rgb(255, 160, 165)"}, ALL) +assert-css: (".item-table .union", {"color": "rgb(255, 160, 165)"}, ALL) +assert-css: (".item-table .keyword", {"color": "rgb(57, 175, 215)"}, ALL) + +assert-css: ( + ".sidebar-elems a:not(.current)", + {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)", "font-weight": "400"}, + ALL, +) +assert-css: ( + ".sidebar-elems a.current", + {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)", "font-weight": "500"}, + ALL, +) + + +// Dark theme +local-storage: {"rustdoc-theme": "dark"} +reload: + +assert-css: (".item-table .mod", {"color": "rgb(210, 153, 29)"}, ALL) +assert-css: (".item-table .macro", {"color": "rgb(9, 189, 0)"}, ALL) +assert-css: (".item-table .struct", {"color": "rgb(45, 191, 184)"}, ALL) +assert-css: (".item-table .enum", {"color": "rgb(45, 191, 184)"}, ALL) +assert-css: (".item-table .trait", {"color": "rgb(183, 140, 242)"}, ALL) +assert-css: (".item-table .fn", {"color": "rgb(43, 171, 99)"}, ALL) +assert-css: (".item-table .type", {"color": "rgb(45, 191, 184)"}, ALL) +assert-css: (".item-table .union", {"color": "rgb(45, 191, 184)"}, ALL) +assert-css: (".item-table .keyword", {"color": "rgb(210, 153, 29)"}, ALL) + +assert-css: ( + ".sidebar-elems a:not(.current)", + {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)", "font-weight": "400"}, + ALL, +) +assert-css: ( + ".sidebar-elems a.current", + {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)", "font-weight": "500"}, + ALL, +) + + +// Light theme +local-storage: {"rustdoc-theme": "light"} +reload: + +assert-css: (".item-table .mod", {"color": "rgb(56, 115, 173)"}, ALL) +assert-css: (".item-table .macro", {"color": "rgb(6, 128, 0)"}, ALL) +assert-css: (".item-table .struct", {"color": "rgb(173, 55, 138)"}, ALL) +assert-css: (".item-table .enum", {"color": "rgb(173, 55, 138)"}, ALL) +assert-css: (".item-table .trait", {"color": "rgb(110, 79, 201)"}, ALL) +assert-css: (".item-table .fn", {"color": "rgb(173, 124, 55)"}, ALL) +assert-css: (".item-table .type", {"color": "rgb(173, 55, 138)"}, ALL) +assert-css: (".item-table .union", {"color": "rgb(173, 55, 138)"}, ALL) +assert-css: (".item-table .keyword", {"color": "rgb(56, 115, 173)"}, ALL) + +assert-css: ( + ".sidebar-elems a:not(.current)", + {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)", "font-weight": "400"}, + ALL, +) +assert-css: ( + ".sidebar-elems a.current", + {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)", "font-weight": "500"}, + ALL, +) diff --git a/src/test/rustdoc-gui/overflow-tooltip-information.goml b/src/test/rustdoc-gui/overflow-tooltip-information.goml index 7ef85a4c4..f481f82c2 100644 --- a/src/test/rustdoc-gui/overflow-tooltip-information.goml +++ b/src/test/rustdoc-gui/overflow-tooltip-information.goml @@ -2,7 +2,7 @@ // have overflow and max-width CSS rules set because they create a bug in firefox on // mac. For more information: https://github.com/rust-lang/rust/issues/89185 goto: file://|DOC_PATH|/test_docs/fn.foo.html -assert-css: (".docblock > .information", { +assert-css: (".docblock > .example-wrap .tooltip", { "overflow-x": "visible", "max-width": "none" }, ALL) diff --git a/src/test/rustdoc-gui/pocket-menu.goml b/src/test/rustdoc-gui/pocket-menu.goml index 54f3790a7..71d514648 100644 --- a/src/test/rustdoc-gui/pocket-menu.goml +++ b/src/test/rustdoc-gui/pocket-menu.goml @@ -56,7 +56,7 @@ reload: click: "#help-button" assert-css: ( "#help-button .popover", - {"display": "block", "border-color": "rgb(210, 210, 210)"}, + {"display": "block", "border-color": "rgb(224, 224, 224)"}, ) compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"]) compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"]) @@ -71,7 +71,7 @@ reload: click: "#help-button" assert-css: ( "#help-button .popover", - {"display": "block", "border-color": "rgb(221, 221, 221)"}, + {"display": "block", "border-color": "rgb(224, 224, 224)"}, ) compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"]) compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"]) diff --git a/src/test/rustdoc-gui/search-filter.goml b/src/test/rustdoc-gui/search-filter.goml index d645e2370..35d7ca480 100644 --- a/src/test/rustdoc-gui/search-filter.goml +++ b/src/test/rustdoc-gui/search-filter.goml @@ -40,7 +40,7 @@ press-key: "ArrowUp" press-key: "Enter" // Waiting for the search results to appear... wait-for: "#titles" -assert-property: ("#crate-search", {"value": "All crates"}) +assert-property: ("#crate-search", {"value": "all crates"}) // Checking that the URL parameter is taken into account for crate filtering. goto: file://|DOC_PATH|/test_docs/index.html?search=test&filter-crate=lib2 @@ -48,8 +48,8 @@ wait-for: "#crate-search" assert-property: ("#crate-search", {"value": "lib2"}) assert-false: "#results .externcrate" -// Checking that the text for the "title" is correct (the "All" comes from the ""). +assert-text: (".search-results-title", "Results in all crates", STARTS_WITH) // Checking the display of the crate filter. // We start with the light theme. @@ -69,15 +69,15 @@ click: "#settings-menu" wait-for: "#settings" click: "#theme-dark" wait-for-css: ("#crate-search", { - "border": "1px solid rgb(240, 240, 240)", - "color": "rgb(17, 17, 17)", - "background-color": "rgb(240, 240, 240)", + "border": "1px solid rgb(224, 224, 224)", + "color": "rgb(221, 221, 221)", + "background-color": "rgb(53, 53, 53)", }) // And finally we check the ayu theme. click: "#theme-ayu" wait-for-css: ("#crate-search", { - "border": "1px solid rgb(66, 76, 87)", - "color": "rgb(197, 197, 197)", - "background-color": "rgb(20, 25, 32)", + "border": "1px solid rgb(92, 103, 115)", + "color": "rgb(255, 255, 255)", + "background-color": "rgb(15, 20, 25)", }) diff --git a/src/test/rustdoc-gui/search-form-elements.goml b/src/test/rustdoc-gui/search-form-elements.goml new file mode 100644 index 000000000..1c64974e9 --- /dev/null +++ b/src/test/rustdoc-gui/search-form-elements.goml @@ -0,0 +1,243 @@ +// This test ensures that the elements in ".search-form" have the expected display. +goto: file://|DOC_PATH|/test_docs/index.html +show-text: true + +// Ayu theme +local-storage: { + "rustdoc-theme": "ayu", + "rustdoc-use-system-theme": "false", +} +reload: + +assert-css: ( + ".search-input", + { + "border-color": "rgb(92, 103, 115)", + "background-color": "rgb(20, 25, 32)", + "color": "rgb(255, 255, 255)", + }, +) +focus: ".search-input" +// Nothing should change. +assert-css: ( + ".search-input", + { + "border-color": "rgb(92, 103, 115)", + "background-color": "rgb(20, 25, 32)", + "color": "rgb(255, 255, 255)", + }, +) + +assert-css: ( + "#help-button", + {"border-color": "rgb(197, 197, 197)"}, +) +assert-css: ( + "#help-button > button", + { + "color": "rgb(255, 255, 255)", + "border-color": "rgb(92, 103, 115)", + "background-color": "rgb(20, 25, 32)", + }, +) +move-cursor-to: "#help-button" +assert-css: ( + "#help-button:hover", + {"border-color": "rgb(197, 197, 197)"}, +) +// Only "border-color" should change. +assert-css: ( + "#help-button:hover > button", + { + "color": "rgb(255, 255, 255)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(20, 25, 32)", + }, +) + +assert-css: ( + "#settings-menu", + {"border-color": "rgb(197, 197, 197)"}, +) +assert-css: ( + "#settings-menu > a", + { + "color": "rgb(255, 255, 255)", + "border-color": "rgb(92, 103, 115)", + "background-color": "rgb(20, 25, 32)", + }, +) +move-cursor-to: "#settings-menu" +assert-css: ( + "#settings-menu:hover", + {"border-color": "rgb(197, 197, 197)"}, +) +// Only "border-color" should change. +assert-css: ( + "#settings-menu:hover > a", + { + "color": "rgb(255, 255, 255)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(20, 25, 32)", + }, +) + +// Dark theme +local-storage: { + "rustdoc-theme": "dark", + "rustdoc-use-system-theme": "false", +} +reload: + +assert-css: ( + ".search-input", + { + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(240, 240, 240)", + "color": "rgb(17, 17, 17)", + }, +) +focus: ".search-input" +// Only "border-color" should change. +assert-css: ( + ".search-input", + { + "border-color": "rgb(0, 141, 253)", + "background-color": "rgb(240, 240, 240)", + "color": "rgb(17, 17, 17)", + }, +) + +assert-css: ( + "#help-button", + {"border-color": "rgb(221, 221, 221)"}, +) +assert-css: ( + "#help-button > button", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(240, 240, 240)", + }, +) +move-cursor-to: "#help-button" +assert-css: ( + "#help-button:hover", + {"border-color": "rgb(221, 221, 221)"}, +) +// Only "border-color" should change. +assert-css: ( + "#help-button:hover > button", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(255, 185, 0)", + "background-color": "rgb(240, 240, 240)", + }, +) + +assert-css: ( + "#settings-menu", + {"border-color": "rgb(221, 221, 221)"}, +) +assert-css: ( + "#settings-menu > a", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(240, 240, 240)", + }, +) +move-cursor-to: "#settings-menu" +assert-css: ( + "#settings-menu:hover", + {"border-color": "rgb(221, 221, 221)"}, +) +// Only "border-color" should change. +assert-css: ( + "#settings-menu:hover > a", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(255, 185, 0)", + "background-color": "rgb(240, 240, 240)", + }, +) + +// Light theme +local-storage: { + "rustdoc-theme": "light", + "rustdoc-use-system-theme": "false", +} +reload: + +assert-css: ( + ".search-input", + { + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(255, 255, 255)", + "color": "rgb(0, 0, 0)", + }, +) +focus: ".search-input" +// Nothing should change. +assert-css: ( + ".search-input", + { + "border-color": "rgb(102, 175, 233)", + "background-color": "rgb(255, 255, 255)", + "color": "rgb(0, 0, 0)", + }, +) + +assert-css: ( + "#help-button", + {"border-color": "rgb(0, 0, 0)"}, +) +assert-css: ( + "#help-button > button", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(255, 255, 255)", + }, +) +move-cursor-to: "#help-button" +assert-css: ( + "#help-button:hover", + {"border-color": "rgb(0, 0, 0)"}, +) +// Only "border-color" should change. +assert-css: ( + "#help-button:hover > button", + { + "color": "rgb(0, 0, 0)", + "border-color": "rgb(113, 113, 113)", + "background-color": "rgb(255, 255, 255)", + }, +) + +assert-css: ( + "#settings-menu", + {"border-color": "rgb(0, 0, 0)"}, +) +assert-css: ( + "#settings-menu > a", + { + "color": "rgb(56, 115, 173)", + "border-color": "rgb(224, 224, 224)", + "background-color": "rgb(255, 255, 255)", + }, +) +move-cursor-to: "#settings-menu" +assert-css: ( + "#settings-menu:hover", + {"border-color": "rgb(0, 0, 0)"}, +) +// Only "border-color" should change. +assert-css: ( + "#settings-menu:hover > a", + { + "color": "rgb(56, 115, 173)", + "border-color": "rgb(113, 113, 113)", + "background-color": "rgb(255, 255, 255)", + }, +) diff --git a/src/test/rustdoc-gui/search-input.goml b/src/test/rustdoc-gui/search-input.goml deleted file mode 100644 index 44123b702..000000000 --- a/src/test/rustdoc-gui/search-input.goml +++ /dev/null @@ -1,23 +0,0 @@ -// Ensures that the search input border color changes on focus. -goto: file://|DOC_PATH|/test_docs/index.html -local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"} -reload: - -assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"}) -click: ".search-input" -focus: ".search-input" -assert-css: (".search-input", {"border-color": "rgb(0, 141, 253)"}) - -local-storage: {"rustdoc-theme": "light"} -reload: - -assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"}) -click: ".search-input" -assert-css: (".search-input", {"border-color": "rgb(102, 175, 233)"}) - -local-storage: {"rustdoc-theme": "ayu"} -reload: - -assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"}) -click: ".search-input" -assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"}) diff --git a/src/test/rustdoc-gui/search-result-color.goml b/src/test/rustdoc-gui/search-result-color.goml index 9a49ae2c6..c4b5fdf53 100644 --- a/src/test/rustdoc-gui/search-result-color.goml +++ b/src/test/rustdoc-gui/search-result-color.goml @@ -7,7 +7,6 @@ show-text: true // Ayu theme local-storage: { "rustdoc-theme": "ayu", - "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false", } reload: @@ -23,16 +22,82 @@ assert-css: ( {"color": "rgb(0, 150, 207)"}, ) -// Checking the color for "keyword". +// Checking the color of "keyword" text. assert-css: ( "//*[@class='result-name']//*[text()='(keyword)']", {"color": "rgb(120, 135, 151)"}, ) +// Checking the color of "keyword". +assert-css: ( + ".result-name .keyword", + {"color": "rgb(57, 175, 215)"}, + ALL, +) +// Check the color of "struct". +assert-css: ( + ".result-name .struct", + {"color": "rgb(255, 160, 165)"}, + ALL, +) +// Check the color of "associated type". +assert-css: ( + ".result-name .associatedtype", + {"color": "rgb(57, 175, 215)"}, + ALL, +) +// Check the color of "type method". +assert-css: ( + ".result-name .tymethod", + {"color": "rgb(253, 214, 135)"}, + ALL, +) +// Check the color of "method". +assert-css: ( + ".result-name .method", + {"color": "rgb(253, 214, 135)"}, + ALL, +) +// Check the color of "struct field". +assert-css: ( + ".result-name .structfield", + {"color": "rgb(0, 150, 207)"}, + ALL, +) +// Check the color of "macro". +assert-css: ( + ".result-name .macro", + {"color": "rgb(163, 122, 204)"}, + ALL, +) +// Check the color of "fn". +assert-css: ( + ".result-name .fn", + {"color": "rgb(253, 214, 135)"}, + ALL, +) + +// Checking the `` container. +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(0, 150, 207)", "background-color": "rgba(0, 0, 0, 0)"}, + ALL, +) + +// Checking color and background on hover. +move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']" +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']", + {"color": "rgb(255, 255, 255)"}, +) +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(255, 255, 255)", "background-color": "rgb(60, 60, 60)"}, +) + // Dark theme local-storage: { "rustdoc-theme": "dark", - "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false", } reload: @@ -54,6 +119,72 @@ assert-css: ( {"color": "rgb(221, 221, 221)"}, ) +// Checking the color of "keyword". +assert-css: ( + ".result-name .keyword", + {"color": "rgb(210, 153, 29)"}, + ALL, +) +// Check the color of "struct". +assert-css: ( + ".result-name .struct", + {"color": "rgb(45, 191, 184)"}, + ALL, +) +// Check the color of "associated type". +assert-css: ( + ".result-name .associatedtype", + {"color": "rgb(210, 153, 29)"}, + ALL, +) +// Check the color of "type method". +assert-css: ( + ".result-name .tymethod", + {"color": "rgb(43, 171, 99)"}, + ALL, +) +// Check the color of "method". +assert-css: ( + ".result-name .method", + {"color": "rgb(43, 171, 99)"}, + ALL, +) +// Check the color of "struct field". +assert-css: ( + ".result-name .structfield", + {"color": "rgb(221, 221, 221)"}, + ALL, +) +// Check the color of "macro". +assert-css: ( + ".result-name .macro", + {"color": "rgb(9, 189, 0)"}, + ALL, +) +// Check the color of "fn". +assert-css: ( + ".result-name .fn", + {"color": "rgb(43, 171, 99)"}, + ALL, +) + +// Checking the `` container. +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"}, +) + +// Checking color and background on hover. +move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']" +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']", + {"color": "rgb(221, 221, 221)"}, +) +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(221, 221, 221)", "background-color": "rgb(119, 119, 119)"}, +) + // Light theme local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} reload: @@ -75,13 +206,78 @@ assert-css: ( {"color": "rgb(0, 0, 0)"}, ) +// Checking the color of "keyword". +assert-css: ( + ".result-name .keyword", + {"color": "rgb(56, 115, 173)"}, + ALL, +) +// Check the color of "struct". +assert-css: ( + ".result-name .struct", + {"color": "rgb(173, 55, 138)"}, + ALL, +) +// Check the color of "associated type". +assert-css: ( + ".result-name .associatedtype", + {"color": "rgb(56, 115, 173)"}, + ALL, +) +// Check the color of "type method". +assert-css: ( + ".result-name .tymethod", + {"color": "rgb(173, 124, 55)"}, + ALL, +) +// Check the color of "method". +assert-css: ( + ".result-name .method", + {"color": "rgb(173, 124, 55)"}, + ALL, +) +// Check the color of "struct field". +assert-css: ( + ".result-name .structfield", + {"color": "rgb(0, 0, 0)"}, + ALL, +) +// Check the color of "macro". +assert-css: ( + ".result-name .macro", + {"color": "rgb(6, 128, 0)"}, + ALL, +) +// Check the color of "fn". +assert-css: ( + ".result-name .fn", + {"color": "rgb(173, 124, 55)"}, + ALL, +) + +// Checking the `` container. +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"}, +) + +// Checking color and background on hover. +move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']" +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']", + {"color": "rgb(0, 0, 0)"}, +) +assert-css: ( + "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a", + {"color": "rgb(0, 0, 0)", "background-color": "rgb(221, 221, 221)"}, +) + // Check the alias more specifically in the dark theme. goto: file://|DOC_PATH|/test_docs/index.html // We set the theme so we're sure that the correct values will be used, whatever the computer // this test is running on. local-storage: { "rustdoc-theme": "dark", - "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false", } // If the text isn't displayed, the browser doesn't compute color style correctly... diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml index 8464ba7c2..efbbfb925 100644 --- a/src/test/rustdoc-gui/search-result-display.goml +++ b/src/test/rustdoc-gui/search-result-display.goml @@ -4,26 +4,25 @@ size: (900, 1000) write: (".search-input", "test") // To be SURE that the search will be run. press-key: 'Enter' -wait-for: "#search-settings" +wait-for: "#crate-search" // The width is returned by "getComputedStyle" which returns the exact number instead of the // CSS rule which is "50%"... -assert-css: (".search-results div.desc", {"width": "295px"}) +assert-css: (".search-results div.desc", {"width": "293px"}) size: (600, 100) // As counter-intuitive as it may seem, in this width, the width is "100%", which is why // when computed it's larger. -assert-css: (".search-results div.desc", {"width": "570px"}) +assert-css: (".search-results div.desc", {"width": "566px"}) + +// The result set is all on one line. +assert-css: (".search-results .result-name > span", {"display": "inline"}) // Check that the crate filter `` isn't bigger than its container. +// Then we compare again to confirm the height didn't change. +assert-css: ("#crate-search", {"width": "527px"}) +assert-css: (".search-results-title", {"height": "44px", "width": "640px"}) +// And we check that the `