about summary refs log tree commit diff
path: root/tests/rustdoc-gui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-12 22:19:29 +0000
committerbors <bors@rust-lang.org>2023-04-12 22:19:29 +0000
commit9693b178fcebe3cc27129b7bc1237ee5eb706af8 (patch)
treefebbc3b08f6ad0e8a8e53a456aa5d7661cec1dbf /tests/rustdoc-gui
parent4087deaccd8bceb458c9610d29744d5f3504c5c0 (diff)
parentb01f0d392864fd581fd6cb4cd1648959bdfbfc5f (diff)
downloadrust-9693b178fcebe3cc27129b7bc1237ee5eb706af8.tar.gz
rust-9693b178fcebe3cc27129b7bc1237ee5eb706af8.zip
Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #109810 (Replace rustdoc-ui/{c,z}-help tests with a stable run-make test )
 - #110035 (fix: ensure bad `#[test]` invocs retain correct AST)
 - #110089 (sync::mpsc: synchronize receiver disconnect with initialization)
 - #110103 (Report overflows gracefully with new solver)
 - #110122 (Fix x check --stage 1 when download-ci-llvm=false)
 - #110133 (Do not use ImplDerivedObligationCause for inherent impl method error reporting)
 - #110135 (Revert "Don't recover lifetimes/labels containing emojis as character literals")
 - #110235 (Fix `--extend-css` option)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/rustdoc-gui')
-rw-r--r--tests/rustdoc-gui/extend-css.goml5
-rw-r--r--tests/rustdoc-gui/search-filter.goml2
-rw-r--r--tests/rustdoc-gui/sidebar-source-code.goml2
-rw-r--r--tests/rustdoc-gui/source-code-page.goml2
-rw-r--r--tests/rustdoc-gui/src/extend_css/Cargo.lock7
-rw-r--r--tests/rustdoc-gui/src/extend_css/Cargo.toml7
-rw-r--r--tests/rustdoc-gui/src/extend_css/extra.css3
-rw-r--r--tests/rustdoc-gui/src/extend_css/lib.rs1
8 files changed, 27 insertions, 2 deletions
diff --git a/tests/rustdoc-gui/extend-css.goml b/tests/rustdoc-gui/extend-css.goml
new file mode 100644
index 00000000000..fb34469df6c
--- /dev/null
+++ b/tests/rustdoc-gui/extend-css.goml
@@ -0,0 +1,5 @@
+// Test to ensure that the `--extend-css` option is working as expected.
+go-to: "file://" + |DOC_PATH| + "/extend_css/index.html"
+show-text: true
+// The text from the `.extend` element should be red.
+assert-css: (".extend", {"color": "rgb(255, 0, 0)"})
diff --git a/tests/rustdoc-gui/search-filter.goml b/tests/rustdoc-gui/search-filter.goml
index f114c57ff21..d739471a625 100644
--- a/tests/rustdoc-gui/search-filter.goml
+++ b/tests/rustdoc-gui/search-filter.goml
@@ -16,6 +16,7 @@ press-key: "ArrowDown"
 press-key: "ArrowDown"
 press-key: "ArrowDown"
 press-key: "ArrowDown"
+press-key: "ArrowDown"
 press-key: "Enter"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
@@ -41,6 +42,7 @@ press-key: "ArrowUp"
 press-key: "ArrowUp"
 press-key: "ArrowUp"
 press-key: "ArrowUp"
+press-key: "ArrowUp"
 press-key: "Enter"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
diff --git a/tests/rustdoc-gui/sidebar-source-code.goml b/tests/rustdoc-gui/sidebar-source-code.goml
index 96ea7202433..520b2c59b0f 100644
--- a/tests/rustdoc-gui/sidebar-source-code.goml
+++ b/tests/rustdoc-gui/sidebar-source-code.goml
@@ -73,7 +73,7 @@ assert: "//*[@class='dir-entry' and @open]/*[text()='sub_mod']"
 // Only "another_folder" should be "open" in "lib2".
 assert: "//*[@class='dir-entry' and not(@open)]/*[text()='another_mod']"
 // All other trees should be collapsed.
-assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@open)]", 8)
+assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@open)]", 9)
 
 // We now switch to mobile mode.
 set-window-size: (600, 600)
diff --git a/tests/rustdoc-gui/source-code-page.goml b/tests/rustdoc-gui/source-code-page.goml
index 1ac403308eb..42f3200e967 100644
--- a/tests/rustdoc-gui/source-code-page.goml
+++ b/tests/rustdoc-gui/source-code-page.goml
@@ -102,7 +102,7 @@ assert: ".source-sidebar-expanded"
 
 // We check that the first entry of the sidebar is collapsed
 assert-property: ("#source-sidebar details:first-of-type", {"open": "false"})
-assert-text: ("#source-sidebar details:first-of-type > summary", "http")
+assert-text: ("#source-sidebar details:first-of-type > summary", "extend_css")
 // We now click on it.
 click: "#source-sidebar details:first-of-type > summary"
 assert-property: ("#source-sidebar details:first-of-type", {"open": "true"})
diff --git a/tests/rustdoc-gui/src/extend_css/Cargo.lock b/tests/rustdoc-gui/src/extend_css/Cargo.lock
new file mode 100644
index 00000000000..7101a6f0ffb
--- /dev/null
+++ b/tests/rustdoc-gui/src/extend_css/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "extend_css"
+version = "0.1.0"
diff --git a/tests/rustdoc-gui/src/extend_css/Cargo.toml b/tests/rustdoc-gui/src/extend_css/Cargo.toml
new file mode 100644
index 00000000000..91683fe8964
--- /dev/null
+++ b/tests/rustdoc-gui/src/extend_css/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "extend_css"
+version = "0.1.0"
+edition = "2018"
+
+[lib]
+path = "lib.rs"
diff --git a/tests/rustdoc-gui/src/extend_css/extra.css b/tests/rustdoc-gui/src/extend_css/extra.css
new file mode 100644
index 00000000000..ee7062d9621
--- /dev/null
+++ b/tests/rustdoc-gui/src/extend_css/extra.css
@@ -0,0 +1,3 @@
+.extend {
+    color: red !important;
+}
diff --git a/tests/rustdoc-gui/src/extend_css/lib.rs b/tests/rustdoc-gui/src/extend_css/lib.rs
new file mode 100644
index 00000000000..3a3babf8984
--- /dev/null
+++ b/tests/rustdoc-gui/src/extend_css/lib.rs
@@ -0,0 +1 @@
+//! <div class="extend">text in red</div>