Skip to content

Commit a2e8749

Browse files
authored
Rollup merge of #93170 - GuillaumeGomez:gui-tests-explanations, r=jsha
Add missing GUI test explanations Some GUI tests didn't have a global explanation about what they were testing. This fixes it. r? `@jsha`
2 parents f2ccb2c + 78cee22 commit a2e8749

17 files changed

+22
-3
lines changed

src/test/rustdoc-gui/check_info_sign_position.goml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This test checks the position of the information on the code blocks (like
2+
// `compile_fail` or `ignore`).
13
goto: file://|DOC_PATH|/test_docs/index.html
24
goto: ./fn.check_list_code_block.html
35
// If the codeblock is the first element of the docblock, the information tooltip must have

src/test/rustdoc-gui/code-sidebar-toggle.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This test checks that the source code pages sidebar toggle is working as expected.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
click: ".srclink"
34
wait-for: "#sidebar-toggle"

src/test/rustdoc-gui/escape-key.goml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This test ensures that the "Escape" shortcut is handled correctly based on the
2+
// current content displayed.
13
goto: file://|DOC_PATH|/test_docs/index.html
24
// First, we check that the search results are hidden when the Escape key is pressed.
35
write: (".search-input", "test")

src/test/rustdoc-gui/font-weight.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
goto: file://|DOC_PATH|/lib2/struct.Foo.html
21
// This test checks that the font weight is correctly applied.
2+
goto: file://|DOC_PATH|/lib2/struct.Foo.html
33
assert-css: ("//*[@class='docblock item-decl']//a[text()='Alias']", {"font-weight": "400"})
44
assert-css: (
55
"//*[@class='structfield small-section-header']//a[text()='Alias']",

src/test/rustdoc-gui/huge-collection-of-constants.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
goto: file://|DOC_PATH|/test_docs/huge_amount_of_consts/index.html
2-
31
// Make sure that the last two entries are more than 12 pixels apart and not stacked on each other.
42

3+
goto: file://|DOC_PATH|/test_docs/huge_amount_of_consts/index.html
4+
55
compare-elements-position-near-false: (
66
"//*[@class='item-table']//div[last()-1]",
77
"//*[@class='item-table']//div[last()-3]",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This test checks that code blocks in list are supported.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
goto: ./fn.check_list_code_block.html
34
assert: ("pre.rust.fn")

src/test/rustdoc-gui/search-filter.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the crate search filtering is handled correctly and changes the results.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
show-text: true
34
write: (".search-input", "test")

src/test/rustdoc-gui/search-result-colors.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the result colors are as expected.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
// We set the theme so we're sure that the correct values will be used, whatever the computer
34
// this test is running on.

src/test/rustdoc-gui/search-result-display.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the search results have the expected width.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
size: (900, 1000)
34
write: (".search-input", "test")

src/test/rustdoc-gui/search-result-keyword.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the "keyword" results have the expected text alongside them.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
write: (".search-input", "CookieMonster")
34
// Waiting for the search results to appear...

src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Checks that the first non-empty search result tab is selected if the default/currently selected
2+
// one is empty.
13
goto: file://|DOC_PATH|/test_docs/index.html
24
write: (".search-input", "Foo")
35
// Waiting for the search results to appear...

src/test/rustdoc-gui/sidebar.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks multiple things on the sidebar display (width of its elements, colors, etc).
12
goto: file://|DOC_PATH|/test_docs/index.html
23
show-text: true
34
local-storage: {"rustdoc-theme": "light"}

src/test/rustdoc-gui/source-code-page.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the interactions with the source code pages are workined as expected.
12
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
23
// Check that we can click on the line number.
34
click: ".line-numbers > span:nth-child(4)" // This is the span for line 4.

src/test/rustdoc-gui/theme-change.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Ensures that the theme change is working as expected.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
click: "#theme-picker"
34
click: "#theme-choices > button:first-child"

src/test/rustdoc-gui/toggle-docs-mobile.goml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Checks that the documentation toggles on mobile have the correct position, style and work
2+
// as expected.
13
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
24
size: (433, 600)
35
assert-attribute: (".top-doc", {"open": ""})

src/test/rustdoc-gui/toggle-docs.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the documentation toggles have the correct position, style and work as expected.
12
goto: file://|DOC_PATH|/test_docs/index.html
23
assert-attribute: ("#main-content > details.top-doc", {"open": ""})
34
assert-text: ("#toggle-all-docs", "[−]")

src/test/rustdoc-gui/trait-sidebar-item-order.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Checks that the elements in the sidebar are alphabetically sorted.
12
goto: file://|DOC_PATH|/test_docs/trait.AnotherOne.html
23
assert-text: (".sidebar-links a:nth-of-type(1)", "another")
34
assert-text: (".sidebar-links a:nth-of-type(2)", "func1")

0 commit comments

Comments
 (0)