commit cd438e5cf711cad96ad724ab775fe862b3c1dcc8
parent c5cc3c8b120beeeee929c6028b1c5f705e7bbd0f
Author: Nicolas Chevobbe <nchevobbe@mozilla.com>
Date: Thu, 2 Oct 2025 07:54:08 +0000
Bug 1990541 - [devtools] Fix browser_rules_gridline-names-autocomplete.js intermittent failures. r=devtools-reviewers,jdescottes
Wait for the input to have the value we expect
Differential Revision: https://phabricator.services.mozilla.com/D267167
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js b/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js
@@ -211,6 +211,11 @@ async function testCompletion(
info("Checking the state");
if (completion !== null) {
+ try {
+ await waitFor(() => editor.input.value === completion);
+ } catch (e) {
+ // catch the exception so we'll get a nicer failure in the assertion below
+ }
is(editor.input.value, completion, "Correct value is autocompleted");
}