From d78746c8eab3da9e382774c14460b50bf2b5a5e5 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 13 Jun 2024 22:32:15 +0200 Subject: [PATCH 1/2] Reduce rustdoc GUI tests flakyness --- tests/rustdoc-gui/utils.goml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/rustdoc-gui/utils.goml b/tests/rustdoc-gui/utils.goml index 844dc98a5374c..4bfacba1989fa 100644 --- a/tests/rustdoc-gui/utils.goml +++ b/tests/rustdoc-gui/utils.goml @@ -10,9 +10,11 @@ define-function: ( wait-for: "#settings" // Change the setting. click: "#theme-"+ |theme| + // We wait for the radio button to be updated. + wait-for: "#theme-"+ |theme| + ":checked" // 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|} }, ) From ba8a955e8fe67f6488761f4f121002d2381e750e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 14 Jun 2024 00:46:32 +0200 Subject: [PATCH 2/2] TO REMOVE: add debug in failing gui test --- tests/rustdoc-gui/help-page.goml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/rustdoc-gui/help-page.goml b/tests/rustdoc-gui/help-page.goml index 09d33af139cdd..8fb4773325c64 100644 --- a/tests/rustdoc-gui/help-page.goml +++ b/tests/rustdoc-gui/help-page.goml @@ -20,6 +20,7 @@ define-function: ( "check-colors", [theme, color, background, box_shadow], block { + debug: true call-function: ("switch-theme", {"theme": |theme|}) assert-css: ("#help kbd", { "color": |color|,