Bug 1775149 - [devtools] Fix intermittent failure for browser_toolbox_options_frames_button.js r=nchevobbe

Fixes the failure locally, rendering the iframe button might not be synchronous with updating the pref

Differential Revision: https://phabricator.services.mozilla.com/D153323
This commit is contained in:
Julian Descottes
2022-08-01 07:14:26 +00:00
parent 895996a26e
commit 20708055c8
@@ -37,8 +37,10 @@ add_task(async function() {
);
framesButtonCheckbox.click();
framesButton = doc.getElementById("command-button-frames");
ok(framesButton, "Frames button is rendered.");
info("Wait for the frame button to be rendered");
framesButton = await waitFor(() =>
doc.getElementById("command-button-frames")
);
ok(framesButton.disabled, "Frames button is disabled.");
info("Leave the options panel, the frames button should not be rendered.");