-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back help-page.goml
rustdoc GUI test
#127082
Conversation
@bors rollup=iffy |
This comment has been minimized.
This comment has been minimized.
If only I could know what's going on in this server... |
Like this it works. Makes me sad but better that than not having this test. |
Try this change? diff --git a/tests/rustdoc-gui/utils.goml b/tests/rustdoc-gui/utils.goml
index 844dc98a537..7bf3fe05772 100644
--- a/tests/rustdoc-gui/utils.goml
+++ b/tests/rustdoc-gui/utils.goml
@@ -13,6 +13,6 @@ define-function: (
// Close the popover.
click: "#settings-menu"
// Ensure that the local storage was correctly updated.
- assert-local-storage: {"rustdoc-theme": |theme|}
+ wait-for-local-storage: {"rustdoc-theme": |theme|}
},
) |
I already tried it in #126436. |
Okay, try this one: diff --git a/src/librustdoc/html/static/js/settings.js b/src/librustdoc/html/static/js/settings.js
index 2b42fbebb80..176f6f86b20 100644
--- a/src/librustdoc/html/static/js/settings.js
+++ b/src/librustdoc/html/static/js/settings.js
@@ -219,6 +219,9 @@
document.getElementById(MAIN_ID).appendChild(el);
} else {
el.setAttribute("tabindex", "-1");
+ // Don't make the popover visible until after the event handlers are set up.
+ // Otherwise, we get flakey integration tests.
+ el.style.display = "none";
getSettingsButton().appendChild(el);
}
return el;
diff --git a/tests/rustdoc-gui/utils.goml b/tests/rustdoc-gui/utils.goml
index 844dc98a537..ebf0c65bd14 100644
--- a/tests/rustdoc-gui/utils.goml
+++ b/tests/rustdoc-gui/utils.goml
@@ -7,12 +7,12 @@ define-function: (
// Open the settings menu.
click: "#settings-menu"
// Wait for the popover to appear...
- wait-for: "#settings"
+ wait-for-css: ("#settings", {"display": "block"})
// Change the setting.
click: "#theme-"+ |theme|
// Close the popover.
click: "#settings-menu"
// Ensure that the local storage was correctly updated.
- assert-local-storage: {"rustdoc-theme": |theme|}
+ wait-for-local-storage: {"rustdoc-theme": |theme|}
},
) The interesting part, the change in settings.js, is based on this hypothesis:
To avoid this, I ensure the settings page isn't visible until after the event handlers are registered. |
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
Let's see if it works. |
Ah, github actions seems to be having issues. Suspense instensifies |
This comment has been minimized.
This comment has been minimized.
Same failure. Dark magic, really. I have no clue why it just doesn't work in the CI. |
f52d974
to
c8bbeef
Compare
K @bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ad12a2a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary 4.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 696.913s -> 697.036s (0.02%) |
Since #127010 was merged, let's see if we can revert #126445...
r? @notriddle