Skip to content

Commit 1440b07

Browse files
Update GUI test to reflect update on theme selection
1 parent 96ccba2 commit 1440b07

16 files changed

+36
-93
lines changed

src/test/rustdoc-gui/anchors.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ goto: file://|DOC_PATH|/staged_api/struct.Foo.html
55
show-text: true
66

77
// Set the theme to light.
8-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
8+
local-storage: {"rustdoc-theme": "light"}
99
// We reload the page so the local storage settings are being used.
1010
reload:
1111

src/test/rustdoc-gui/code-color.goml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ goto: file://|DOC_PATH|/test_docs/fn.foo.html
66
// If the text isn't displayed, the browser doesn't compute color style correctly...
77
show-text: true
88
// Set the theme to dark.
9-
local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
9+
local-storage: {"rustdoc-theme": "dark"}
1010
// We reload the page so the local storage settings are being used.
1111
reload:
1212

1313
assert-css: (".docblock pre > code", {"color": "rgb(221, 221, 221)"}, ALL)
1414
assert-css: (".docblock > p > code", {"color": "rgb(221, 221, 221)"}, ALL)
1515

1616
// Set the theme to ayu.
17-
local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
17+
local-storage: {"rustdoc-theme": "ayu"}
1818
// We reload the page so the local storage settings are being used.
1919
reload:
2020

2121
assert-css: (".docblock pre > code", {"color": "rgb(230, 225, 207)"}, ALL)
2222
assert-css: (".docblock > p > code", {"color": "rgb(255, 180, 84)"}, ALL)
2323

2424
// Set the theme to light.
25-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
25+
local-storage: {"rustdoc-theme": "light"}
2626
// We reload the page so the local storage settings are being used.
2727
reload:
2828

src/test/rustdoc-gui/docblock-details.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This ensures that the `<details>`/`<summary>` elements are displayed as expected.
22
goto: file://|DOC_PATH|/test_docs/details/struct.Details.html
33
show-text: true
4-
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
4+
local-storage: {"rustdoc-theme": "dark"}
55
reload:
66

77
// We first check that the headers in the `.top-doc` doc block still have their

src/test/rustdoc-gui/headers-color.goml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html
55
show-text: true
66

77
// Ayu theme
8-
local-storage: {
9-
"rustdoc-theme": "ayu",
10-
"rustdoc-preferred-dark-theme": "ayu",
11-
"rustdoc-use-system-theme": "false",
12-
}
8+
local-storage: {"rustdoc-theme": "ayu"}
139
reload:
1410

1511
assert-css: (
@@ -44,11 +40,7 @@ goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
4440
assert-css: (".docblock > :not(p) > a", {"color": "rgb(57, 175, 215)"}, ALL)
4541

4642
// Dark theme
47-
local-storage: {
48-
"rustdoc-theme": "dark",
49-
"rustdoc-preferred-dark-theme": "dark",
50-
"rustdoc-use-system-theme": "false",
51-
}
43+
local-storage: {"rustdoc-theme": "dark"}
5244
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
5345

5446
assert-css: (
@@ -83,7 +75,7 @@ goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
8375
assert-css: (".docblock > :not(p) > a", {"color": "rgb(210, 153, 29)"}, ALL)
8476

8577
// Light theme
86-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
78+
local-storage: {"rustdoc-theme": "light"}
8779
reload:
8880

8981
goto: file://|DOC_PATH|/test_docs/struct.Foo.html

src/test/rustdoc-gui/headings.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"})
152152

153153
// Checking colors now.
154154
show-text: true
155-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
155+
local-storage: {"rustdoc-theme": "light"}
156156
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
157157
assert-css: (
158158
".top-doc .docblock h2",

src/test/rustdoc-gui/jump-to-def-background.goml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
goto: file://|DOC_PATH|/src/link_to_definition/lib.rs.html
33

44
// Set the theme to dark.
5-
local-storage: {
6-
"rustdoc-theme": "dark",
7-
"rustdoc-preferred-dark-theme": "dark",
8-
"rustdoc-use-system-theme": "false",
9-
}
5+
local-storage: {"rustdoc-theme": "dark"}
106
// We reload the page so the local storage settings are being used.
117
reload:
128

@@ -17,11 +13,7 @@ assert-css: (
1713
)
1814

1915
// Set the theme to ayu.
20-
local-storage: {
21-
"rustdoc-theme": "ayu",
22-
"rustdoc-preferred-dark-theme": "ayu",
23-
"rustdoc-use-system-theme": "false",
24-
}
16+
local-storage: {"rustdoc-theme": "ayu"}
2517
// We reload the page so the local storage settings are being used.
2618
reload:
2719

@@ -32,7 +24,7 @@ assert-css: (
3224
)
3325

3426
// Set the theme to light.
35-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
27+
local-storage: {"rustdoc-theme": "light"}
3628
// We reload the page so the local storage settings are being used.
3729
reload:
3830

src/test/rustdoc-gui/pocket-menu.goml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ assert-css: ("#settings-menu .popover", {"display": "none"})
3232
// We check the borders color now:
3333

3434
// Ayu theme
35-
local-storage: {
36-
"rustdoc-theme": "ayu",
37-
"rustdoc-use-system-theme": "false",
38-
}
35+
local-storage: {"rustdoc-theme": "ayu"}
3936
reload:
4037

4138
click: "#help-button"
@@ -47,10 +44,7 @@ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-co
4744
compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
4845

4946
// Dark theme
50-
local-storage: {
51-
"rustdoc-theme": "dark",
52-
"rustdoc-use-system-theme": "false",
53-
}
47+
local-storage: {"rustdoc-theme": "dark"}
5448
reload:
5549

5650
click: "#help-button"
@@ -62,10 +56,7 @@ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-co
6256
compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
6357

6458
// Light theme
65-
local-storage: {
66-
"rustdoc-theme": "light",
67-
"rustdoc-use-system-theme": "false",
68-
}
59+
local-storage: {"rustdoc-theme": "light"}
6960
reload:
7061

7162
click: "#help-button"

src/test/rustdoc-gui/rust-logo.goml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
goto: file://|DOC_PATH|/test_docs/index.html
33

44
// First we start with the dark theme.
5-
local-storage: {
6-
"rustdoc-theme": "dark",
7-
"rustdoc-preferred-dark-theme": "dark",
8-
"rustdoc-use-system-theme": "false",
9-
}
5+
local-storage: {"rustdoc-theme": "dark"}
106
reload:
117

128
assert-css: (
@@ -17,11 +13,7 @@ assert-css: (
1713
// In the source view page now.
1814
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
1915

20-
local-storage: {
21-
"rustdoc-theme": "dark",
22-
"rustdoc-preferred-dark-theme": "dark",
23-
"rustdoc-use-system-theme": "false",
24-
}
16+
local-storage: {"rustdoc-theme": "dark"}
2517
reload:
2618

2719
assert-css: (
@@ -30,11 +22,7 @@ assert-css: (
3022
)
3123

3224
// Then with the ayu theme.
33-
local-storage: {
34-
"rustdoc-theme": "ayu",
35-
"rustdoc-preferred-dark-theme": "ayu",
36-
"rustdoc-use-system-theme": "false",
37-
}
25+
local-storage: {"rustdoc-theme": "ayu"}
3826
reload:
3927

4028
assert-css: (
@@ -45,11 +33,7 @@ assert-css: (
4533
// In the source view page now.
4634
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
4735

48-
local-storage: {
49-
"rustdoc-theme": "ayu",
50-
"rustdoc-preferred-dark-theme": "ayu",
51-
"rustdoc-use-system-theme": "false",
52-
}
36+
local-storage: {"rustdoc-theme": "ayu"}
5337
reload:
5438

5539
assert-css: (
@@ -58,7 +42,7 @@ assert-css: (
5842
)
5943

6044
// And finally with the light theme.
61-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
45+
local-storage: {"rustdoc-theme": "light"}
6246
reload:
6347

6448
assert-css: (
@@ -69,7 +53,7 @@ assert-css: (
6953
// In the source view page now.
7054
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
7155

72-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
56+
local-storage: {"rustdoc-theme": "light"}
7357
reload:
7458

7559
assert-css: (

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ assert-text: (".search-results-title", "Results in all crates", STARTS_WITH)
5353

5454
// Checking the display of the crate filter.
5555
// We start with the light theme.
56-
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
56+
local-storage: {"rustdoc-theme": "light"}
5757
reload:
5858

5959
timeout: 2000

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Checks that the reexports are present in the search index, can have
22
// doc aliases and are highligted when their ID is the hash of the page.
33
goto: file://|DOC_PATH|/test_docs/index.html
4-
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
4+
local-storage: {"rustdoc-theme": "dark"}
55
reload:
66
// First we check that the reexport has the correct ID and no background color.
77
assert-text: ("//*[@id='reexport.TheStdReexport']", "pub use ::std as TheStdReexport;")

0 commit comments

Comments
 (0)