diff --git a/tests/test_zundler.py b/tests/test_zundler.py index b7120a7..0861608 100644 --- a/tests/test_zundler.py +++ b/tests/test_zundler.py @@ -17,10 +17,8 @@ def test_copy_button(selenium): assert "copy-button documentation" in selenium.title selenium.switch_to.frame("main") - # Not sure why there are two buttons, but we need the second one. - # The first cannot be clicked by selenium because it's obscured. - button = selenium.find_element(By.CSS_SELECTOR, "button.copybtn + button.copybtn") + button = selenium.find_element(By.CSS_SELECTOR, "button.copybtn") assert button.get_attribute("data-tooltip") == "Copy" assert "success" not in button.get_attribute("class") diff --git a/zundler/assets/inject_post.js b/zundler/assets/inject_post.js index b22e125..6f07045 100644 --- a/zundler/assets/inject_post.js +++ b/zundler/assets/inject_post.js @@ -101,15 +101,9 @@ var normalize_path = function(path) { var on_set_data = function(argument) { window.global_context = argument; - console.log("Received data from parent", window.global_context); + console.debug("Received data from parent", window.global_context); try { monkey_patch(); - // Trigger DOMContentLoaded again, some scripts that have just - // been executed expect it. - window.document.dispatchEvent(new Event("DOMContentLoaded", { - bubbles: true, - cancelable: true - })); } finally { observer.observe(window.document.body, {subtree: true, childList: true}); window.parent.postMessage({